MySQL DELETE命令用于从表中删除行。它与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; Query OK, 3 rows affected (0.06 sec) mysql> select * from employee; Empty set (0.00 sec)
以上是MySQL DELETE 命令的用途是什么?的详细内容。更多信息请关注PHP中文网其他相关文章!