what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;
Answer Posted / sailaja
Hi,
select * from EMP where null=null;
->null=null is always false so it gives 0 records.
if it is null is null then it fetches all the records in a
table..
select * from EMP where 1=1;
->it fetches all the records in a table
if it is select * from EMP where 1=2;
-->it fetches 0 records..
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
how will add additional conditions in sql?
How to find the list of fixed hard drive and free space on server?
What is sharding?
why would you call update statistics? : Sql server database administration
What is cube dimension? : sql server analysis services, ssas
Explain various data region available in ssrs with their use?
how can u get last observation in an unknown dataset ?
How can we rewrite sub-queries into simple select statements or with joins?
explain different types of cursors? : Sql server database administration
What are the types of joins in sql?
Why use “pivot” in sql server?
How to delete duplicate rows?
What are drillthrough reports?
Does a server store data?
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram