這篇文章主要介紹了mysql delete 多表連接刪除功能的相關資料,需要的朋友可以參考下
##單一表的刪除:
DELETE FROM tableName WHERE columnName = value; 删除表内的所有行: 即:保留表的结构、属性、索引 DELETE FROM tablename; DELETE * FROM tablename;
TRUNCATE customer;
多表連接刪除:
DELETE orders,itrms FROM orders,items WHERE orders.userid = items.userid AND orders.orderid = items.orderid AND orders.date<"2000/03/01";
DELETE winery FROM region,winery WHERE winery.regionid = region.regionid AND region.regionname = 'BV';
DELETE orders,items FROM orders INNER JOIN otems ON orders.orderid = items.orderid AND orders.userid = items.userid WHERE orders.date<"2000/03/01";
DELETE QUICK FROM customer WHERE userid<10;
OPTIMIZE TABLE customer;
以上是mysql delete多表連接刪除功能的範例程式碼詳解的詳細內容。更多資訊請關注PHP中文網其他相關文章!