7

我想截断表但是当列值等于NULL

truncate table FB_Player where FB_Player.Status ='NULL'
4

2 回答 2

9

你要找的Delete不是Truncate

您不能将 where 子句与TRUNCATE一起使用。

你可以试试这个: -

delete from FB_Player where FB_Player.Status is NULL

来自维基

您不能在 TRUNCATE TABLE 语句中指定 WHERE 子句——它是全有或全无。

于 2013-09-21T15:14:47.583 回答
9

您不能将 Where 子句与截断一起使用。截断无条件清除表中的所有数据。相反,您使用删除命令。

于 2015-02-28T15:11:52.773 回答