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 pessimistic concurrency?
Why use view instead of a table?
How do you delete a trigger?
What are transactions in sql?
What is dirty page?
How many columns can we include on clustered index ?
What is a data source or ds? : sql server analysis services, ssas
What are different types of database indexes?
What is the difference between the application object and session object?
Differentiate between ms sql server reporting services vs crystal reports?
What is amo? : sql server analysis services, ssas
Describe how to use linked server?
How you can get the list of largest tables in a database?
What is difference between getdate and sysdatetime in sql server 2008?
How to get the definition of a user defined function back?