on ‎2012 Jan 10 4:19 PM
While debugging some SA V11 SQL Queries I found 'where colname = Null' sometimes used interchangeably with 'where colname Is Null' as a test for Null values in a column. I am not sure that they produce the correct result yet the SA will accept the syntax.
Sometimes when creating unions I also see 'colname = Null' used to create a dummy null column used to make sure the union queries are aligned. And of course there is the IsNull() function which can be used to assign values to Nulls in result sets.
What is the correct syntax , are 'where colname = Null' and 'where colname IS Null' equivalent
If not what is the difference in the behavior.
Request clarification before answering.
FWIW, the following FAQ might be helpful, too.
BTW: I have noticed that with the help of the "Related questions" bar on the right - a very useful feature as long as questions are somewhat reasonable tagged:) - Breck, so waddayathank?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.