|
|
|
|
Browse by Tags
All Tags » SQL Server 2005 » Nulls » SQL Server 2008 (RSS)
-
You need to return NULL only if the value of your data is a certain value. How do you do this? There are three different ways.
NULLIFDECLARE @1 char(1)SELECT @1 ='D' SELECT NULLIF(@1,'D')REPLACEThis should not really be used, I just added it here to demonstrate that you can in fact use it.DECLARE @1 char(1)SELECT @1 ='D' SELECT ...
|
|
|
|
|