MySQL DELETE命令用于什么?
MySQLDELETE命令用于从表中删除行。它与WHERE子句一起使用。
语法
DELETE From Table_name WHERE Condition;
示例
在下面的示例中,我们从表'employee'中删除了ID>=100的行。
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; mysql> select * from employee; Empty set (0.00 sec)