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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.