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 |
|
amarmano
Starting Member
3 Posts |
Posted - 2005-07-12 : 04:10:11
|
| In SQL, if i execute the below command,if null=null print 'true'else print 'false'the result is "false", whereas if i execute,if 4=4 print 'true'else print 'false'the result is "true"Could anyone explain, why does it behave differently and return 'false' when null is usedRegds,Amar |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-12 : 04:14:31
|
When comparing to Null you should use is Null than = nullif null is nullprint 'true'elseprint 'false' MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|