Reputation: 114126
Is this correct? Will it work with Sqlite as well?
UPDATE table SET oldCol=NULL WHERE (oldCol!=NULL AND newCol!=NULL)
Upvotes: 0
Views: 44
Reputation: 129
you can use this also. UPDATE table SET oldCol=NULL WHERE (oldCol is not NULL AND newCol is not NULL)
Upvotes: -1
Reputation: 44601
No, you should use is not null
:
update tbl set oldcol = null where oldcol is not null and newcol is not null
Upvotes: 3