Link to home
Create AccountLog in
Avatar of Mark_Co
Mark_CoFlag for United States of America

asked on

Deleting row with a blank column value

i have a person table in SQL and i have columns: id, lastname, firstname, address, city.
City for a person is empty so i want a query to delete the row containing the person with a blank city column value. The code below didn't do it even though no errors were raised.

DELETE FROM persons pers
WHERE lastname = 'saire' AND address = 'NULL'

Open in new window


Thanks
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Use this for addres:

Address IS NULL
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Mark_Co

ASKER

Thank you!