Reputation: 28905
I have a table called contacts
and a column called name
. I'm trying to delete rows where the name field is empty.
I make the following call
delete from contacts where name=''
This doesn't work as expected; the row is not being deleted.
How do I achieve this?
Upvotes: 2
Views: 2029
Reputation: 6416
Start by examining select id, name, len(name) from contacts order by name
so you can find out whether there are spaces or other gobbledygook that look like an empty name but have non-zero length.
Upvotes: 1