I have following tsql code in sql server 2008:
declare @ID INT
SET @ID = 0
IF (@ID IS NOT NULL OR @ID <> 0)
begin
print 'ID is not 0 or null'
end
Since @ID is 0, why does it even get into the begin end … It should not.
You have better luck using
andinstead