SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jun 21, 2004, 10:14 #1
- Join Date
- Sep 2003
- Location
- Wales
- Posts
- 1,181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Deleting rows containing NULL values.
Hi all,
How do I delete a row where the criteria on the row to be deleted is NULL.
An example, I have a table called images, and one of the columns is called location. So if I wanted to delete all the rows in the images table where the value in the location column = NULL, how do I create the query?
So far I have tried the following in my queries...
WHERE location = NULL;
WHERE location = 'NULL';
WHERE location = "NULL";
But to no avail.
Thanks
Tryst
-
Jun 21, 2004, 10:36 #2
- Join Date
- Sep 2002
- Location
- Ohio
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Try "WHERE location IS NULL"
Keith
http://www.mana-ts.com
-
Jun 21, 2004, 11:05 #3
- Join Date
- Sep 2003
- Location
- Wales
- Posts
- 1,181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thats worked a treat.
Thank you, kcomer.
Tryst
Bookmarks