Mysql – Deleting entries from tables

Mysql – 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 ‘Bert Looten’ (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)

Leave a Reply

Your email address will not be published.

seven − one =

This site uses Akismet to reduce spam. Learn how your comment data is processed.