how to get null records also in Sql Server 2005
Can't I use SET ANSI NULL
in my normal parametrize query. In fact I want to take out records where first_name='Rupesh' or NULL
but I am getting only the Rupesh name records.
I have a stored procedure otherwise I could set set ansi null off
and could get all records...
What sh开发者_如何学Pythonould I do now?
where first_name is null or first_name = 'Rupesh'
Try this:
where isnull(first_name, 'Rupesh') = 'Rupesh'
精彩评论