MySQL Forums
Forum List  »  Newbie

DELETE null value
Posted by: Andrew M
Date: January 15, 2016 12:22PM

I'm trying to delete the entire row that is null. One of my class assignments is creating views and one of the views is to have a list limit of 10. Well, with the null row showing up, it is included in the view which I don't want. Here is what I've tried from.

DELETE db_mylastname.books
WHERE book_id IS NULL

This is what I have read from other forums to do. I believe I also tried:

DELETE FROM db_mylastname.books
WHERE book_id IS NULL.

Basically, 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. I am a student, so I'm pretty new to SQL. Any help would be great. Thanks!

Options: ReplyQuote


Subject
Written By
Posted
DELETE null value
January 15, 2016 12:22PM
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.