View previous topic :: View next topic
|
Author |
Message |
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
Hello,
i have null value populated for an integer field in a column in database.
if i run this query
select * from
tab
where
column <> 10;
will this query return 100 or 0?
Regards
Rashmi |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What happens when you run that query on your "null" column? |
|
Back to top |
|
|
rashmi.ranjan75
New User
Joined: 20 Feb 2006 Posts: 34
|
|
|
|
when i run this query it returns 100 but as per my understanding it should return the record. So i just want to know if it is normal that this query should return no record.
Thanks for your help.
Regards
Rashmi |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, i believe it is normal for the query to return no rows if all of the rows have a null valuein the column used for selection. It is neither equal nor not equal - it does not exist. |
|
Back to top |
|
|
|