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.
我有 sqlite 数据库。
在某些列中,我有空值。
我想用空格替换空值..
对此有任何疑问吗?
请告诉我
使用IFNULL. 在查询中:
IFNULL
SELECT IFNULL(mycolumn, ' ') FROM mytable
或者更改表中的数据:
UPDATE mytable SET mycolumn = IFNULL(mycolumn, ' ')
或者:
UPDATE mytable SET mycolumn = ' ' WHERE mycolumn IS NULL