更新时间:2023-10-15 08:49:46
你试过了吗?
UPDATE table
SET col1 = NULL
WHERE col1 = ''
正如评论者指出的那样,您不必执行 ltrim()
或 rtrim()
,并且 NULL
列不会匹配''
.
As the commenters point out, you don't have to do ltrim()
or rtrim()
, and NULL
columns will not match ''
.