我在表格中有45K行(125k中)我需要删除。
DELETE FROM `tablename` WHERE `name` IS NULL ;
返回
ERROR 1395 (HY000): Can not delete from join view
答案 0 :(得分:1)
执行SHOW CREATE VIEW tablename
以查看哪些表位于联接视图的select
中。结果将是:
CREATE VIEW tablename AS SELECT name, f2, f3 … FROM table1;
当您拥有名为name
(table1
)列的表名时,您可以执行删除操作:
DELETE FROM `table1` WHERE `name` IS NULL ;
答案 1 :(得分:0)
试试这个
DELETE FROM `tablename` WHERE `name`="" ;