what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;
Answer Posted / jerry joseph
a. select * from Emp where null = null;
null = null will be always false.. so no rows returned..
change the query to "select * from Emp where null is null;"
to select all rows
b. select * from Emp where 1=1;
1 = 1 will be always true.. so all the rows are returned..
| Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
What is meant by indexing?
What are the advantages to use stored procedures?
What is side by side migration in sql server?
What’s the distinction between dropping a info and taking a info offline?
How to drop an existing table?
What is field with example?
If user is owning any SQL Objects, can we drop that user
What is meant by Active-Passive and Active-Active clustering setup?
What are the different sql server versions?
You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?
How many ways to create table-valued functions?
What is table value parameters (tvp)?
Explain for xml explicit mode?
Why do we need normalization?
What are sparse columns?