2

我有一个名为size. 有些行是null. 我想将这些行的size字段更新为0. 我会怎么做?

4

4 回答 4

3
update tablename
set    size = 0
where  size is null;
于 2012-09-13T12:40:03.240 回答
3
UPDATE TABLENAME
SET size = 0
WHERE size IS NULL
于 2012-09-13T12:40:47.323 回答
2

您必须WHERE size IS NULL在更新子句中使用:

UPDATE table SET size = 0 WHERE size IS NULL;
于 2012-09-13T12:40:10.433 回答
0
UPDATE TABLENAME 
SET SIZE=0
WHERE SIZE IS NULL;
于 2012-09-13T12:41:56.080 回答