MySQL DELETE command is used to delete rows from a table. It is used with WHERE clause.
DELETE From Table_name WHERE Condition;
In the following example, we have deleted the rows with id >= 100 in the table "employee".
mysql> select * from employee; +------+--------+ | Id | name | +------+--------+ | 100 | Ram | | 200 | Gaurav | | 300 | MOHAN | +------+--------+ 3 rows in set (0.00 sec) mysql> delete from employee where id >=100; Query OK, 3 rows affected (0.06 sec) mysql> select * from employee; Empty set (0.00 sec)
The above is the detailed content of What is the purpose of the MySQL DELETE command?. For more information, please follow other related articles on the PHP Chinese website!