MySQL Forums
Forum List  »  Newbie

Re: DELETE null value
Posted by: Phillip Ward
Date: January 18, 2016 06:51AM

Quote

... there is only one book_id where the value is null, so I figured this would get rid of the row.

The result ends out being 0 rows deleted.
Are you really, really sure that the value is null?

Remember:
null  !=  ''  !=  ' '

If you have a table called books in which you have a column called book_id then I would seriously doubt that it should be allowed to hold a null value anyway - it sounds too much like the Primary Key of the table to me.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
January 15, 2016 12:22PM
Re: DELETE null value
January 18, 2016 06:51AM
January 18, 2016 08:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.