WebDevelopersNotes 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

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

In 2011, Hayastan Shakarian, a 75 year old woman from Georgia, the country in Eurasia and not the US state, was looking for copper to sell as scrap. She accidentally chopped the fibre optic cables and cut off Internet services to her country and the neighbour, Armenia. When caught Hayastan pleaded her innocence saying she hasn't even heard of the Internet. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy