you would use the
isnull()
function to replace the null values from your query with a default value. for example
create table #temp
(
IntValue int
)
insert into #temp values (0)
insert into #temp values (1)
insert into #temp values (2)
insert into #temp values (null)
insert into #temp values (3)
select IntValue
from #temp
select isnull(IntValue,-100)
from #temp
what I think your after is something like this
declare @value int
set @value = null
if @value is null then
print 'Value is nothing'
end if
Hope this clears up the different definitions of is null