WDN Logo

home-icon Home / MySQL / mysql beginner tutorial – Deleting entries from tables

mysql beginner tutorial – Deleting entries from tables

mysql beginner tutorial - Deleting entries from tables

The SQL delete statement requires the table name and optional conditions.

DELETE from table_name [WHERE conditions];

NOTE: If you don’t specify any conditions ALL THE DATA IN THE TABLE WILL BE DELETED!!!

One of the Multimedia specialists ‘Hasan Rajabi’ (employee id 10) leaves the company. We’ll delete his entry.

DELETE from employee_data    
WHERE emp_id = 10;

Query OK, 1 row affected (0.00 sec)

Sponsored Links

Search

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

The popular Sudoku involves no mathematics at all. Instead of numbers, shapes, alphabet, colors, symbols etc. can be used. That's the beauty and simplicity of the puzzle! By the way, only 5,472,730,538 Sudoku are solvable. That's a big enough number in itself! Contrary to popular belief stemming probably from it's Japanese sounding name, Sudoku did not originate in Japan! It was created by an American Architect, Howard Garns, who called it Number Place - the Japanese still call it that. On a related note, the credit for popularising Sudoku goes to Wayne Gould, a Hong Kong judge. He spent several years in developing a computer program that would automatically generate these puzzles. Gould also convinced The Times in Britain to publish them. From there, Sudoku quickly reached US shores and spread around the world. [more...]

Share on Whats app Share on Facebook Share on Twitter Share on Google plus