我需要删除表中有 45K 行(共 125k)。
DELETE FROM `tablename` WHERE `name` IS NULL ;
回来
ERROR 1395 (HY000): Can not delete from join view
我需要删除表中有 45K 行(共 125k)。
DELETE FROM `tablename` WHERE `name` IS NULL ;
回来
ERROR 1395 (HY000): Can not delete from join view
做一个SHOW CREATE VIEW tablename
看看哪些表在select
连接视图中。结果将类似于:
CREATE VIEW tablename AS SELECT name, f2, f3 … FROM table1;
当您拥有具有名为name
( table1
) 的列的表的名称时,您可以进行删除:
DELETE FROM `table1` WHERE `name` IS NULL ;
尝试这个
DELETE FROM `tablename` WHERE `name`="" ;