SQL: Selecting empty rows
| From: | Martin | Date: | Tue, 07 Nov 2000 12:15:28 +0000 |
| Subject: | SQL: Selecting empty rows | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24084@lists.php.net to get a copy of this message | ||
Hi !
I got php4 and Postgresql 6.5.
I created a fresh table with some fields, espacialy a text-field (lets
call it "test").
I filled in about 10 rows.
In 3 rows, I filled the field test with some text.
What I want to do:
1.) Select all fields, where the field "test" is emtpy.
2.) Select all fields, where a string is NOT inside the field "test".
I tried:
select * from table where test='';
select * from table where test like '';
select * from table where test not like 'string';
But I never get any rows back, where the field "test" has not been set.
Please help !
Regards
Martin