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中文網其他相關文章!