在什么網(wǎng)站做貿(mào)易好最簡短的培訓(xùn)心得
在執(zhí)行刪除操作之前,建議先運行一個 SELECT
查詢來確認你要刪除的記錄。這可以幫助你避免誤刪數(shù)據(jù)。
刪除字段id默認值為空字符串的所有數(shù)據(jù)
delete from users where id? = '';
刪除字段id默認值為null的所有數(shù)據(jù)
delete from users where id is null;
刪除字段update_time為 2001-10-22 01:58:50的所有值
delete from users where update_time = '2001-10-22 01:58:50';