How to select an int datatype field(bonus) which is inserted as NULL?
Tried the following but prints nothing though there is a valid entry.
select e_name from employee, payroll where datepart(year,hire_date)=2005 and employee.e#=payroll.e# and bonus=null
also if i want to add another year say 2007 to be checked with 2005 using or, what is the query for that?
When testing for null, you must use this syntax:
FYI the syntax for testing if not null is
bonus is not null.All other comparisons (eg =, <, like, etc) will return false with a null value.