Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想截断表但是当列值等于NULL
NULL
truncate table FB_Player where FB_Player.Status ='NULL'
你要找的Delete不是Truncate。
Delete
Truncate
您不能将 where 子句与TRUNCATE一起使用。
你可以试试这个: -
delete from FB_Player where FB_Player.Status is NULL
来自维基
您不能在 TRUNCATE TABLE 语句中指定 WHERE 子句——它是全有或全无。
您不能将 Where 子句与截断一起使用。截断无条件清除表中的所有数据。相反,您使用删除命令。