Can't figure out, how to update decimal field to null or emptiness.
Have tried:
UPDATE ads SET price=NULL WHERE price=0
And
UPDATE ads SET price="" WHERE price=0
Isn't working.
Thanks ;)
(Update)
Just a moment.
解决方案UPDATE ads SET price=NULL WHERE price=0
That is the correct way to set a field to NULL. However it will not work if the column does not allow NULL.
If you have the CREATE statement for that table available, check if it says NOT NULL for the price column.
If you don't have the CREATE statements you can run 'DESC ads' on oracle or mysql and see if NULL is allowed.