1. DELETE ALL DATA
There are 2 ways to delete all the data in a MySQL database table:
TRUNCATE TABLE tablename;
This will delete all data in the table very quickly. In MySQL the table is actually dropped and recreated, hence the speed of the query. The number of deleted rows for MyISAM tables returned is zero; for INNODB it returns the actual number deleted.
DELETE FROM tablename;
This also deletes all the data in the table, but is not as quick as using the “TRUNCATE TABLE” method. In MySQL >= 4.0 the number of rows deleted is returned; in MySQL 3.23 the number returned is always zero.
2. DELETE Specific Data
for example we want to delete data/row with employee id=10 from Table “employee_data”:
DELETE FROM employee_data WHERE emp_id=10;