Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Keshaba
Yak Posting Veteran
52 Posts |
Posted - 2008-11-19 : 08:26:22
|
Hi I am using Sql server 2005 Express.I want to write a query to retrieve all datas from a particular table name 'Employee_Master' whose values of a particular Column Name 'Reason' are NULL. I am trying to write like this but it didn't helpselect * from Employee_Master where Reason = NULLKeshab |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-19 : 08:46:26
|
select * from Employee_Master where Reason IS NULL |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-19 : 08:47:42
|
equality operator wont work with NULL values as NULL is not stored as a value in table. So use IS NULL instead.Alteratively if you want to consider NULL also as a value, you need to change ANSI NULL settings |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-19 : 09:01:19
|
http://doc.ddart.net/mssql/sql70/set-set_5.htm |
|
|
|
|
|