Searching Null

Searching Null

Post by Winno » Sun, 15 Apr 2001 19:22:28



Dear all,

How to use SQL statement to search all records that a specific field is
NULL?

SELECT * FORM db WHERE field1 = 'NULL'   ?

 
 
 

Searching Null

Post by Fred Chatea » Sun, 15 Apr 2001 19:30:13


"Winnoc" wrote ...

Quote:> How to use SQL statement to search all records that a specific field is
> NULL?

> SELECT * FORM db WHERE field1 = 'NULL'   ?

A null has no value so there can be no equality with it. In other words,
nothing is equal to a null.

SELECT * FROM db WHERE field1 Is Null

--
Regards,

Fred Chateau
http://members.home.net/fchateau/

 
 
 

Searching Null

Post by Fred Chatea » Sun, 15 Apr 2001 19:33:44


"Fred Chateau" wrote ...

Quote:> A null has no value so there can be no equality with it. In other words,
> nothing is equal to a null.

> SELECT * FROM db WHERE field1 Is Null

Also . . .

SELECT * FROM db WHERE field1 Is Not Null

--
Regards,

Fred Chateau
http://members.home.net/fchateau/

 
 
 

1. NULL NULL NULL

Hi all,

I have the following table structure in SQL 6.5 with SP5a
created by dbo.  I am able to do  insert into Employee
(Name) values ('Lim')  successfully without any error
despite the fact that Allow Nulls is set to no and default
value is user_name(null). Please advise.  Thanks.

Employee Table
ColumnName    Data   TypeLength  AllowNulls DefaultValue
Name          Char      15              
Addwho        Char      18                  user_name(null)

Regards
Derek

2. XML to SQL encoding hassles.

3. Concat null yields null always returns null in 70 mode

4. picture validity check

5. NULL versus IN (NULL) versus IS NULL

6. Delete with Joins is it possible ?

7. Null, Null, Null!

8. FlexGrid read-write

9. Null Null Null!!!!!!!!!

10. Search with null values

11. Searching for Null dates

12. Search ALL Fields for Nulls

13. Searching for Nulls