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
What is the use of partition by in sql server?
What is sql profiler. What are the default templates with it? : sql server database administration
What is inner join? Explain with an example?
What is the maximum rows in sql server table?
What are the differences between char and nchar in ms sql server?
When I run the sql server 2000 setup, it just hangs. What do I do?
What is exclusive locks?
Which joins are sql server default?
What are the database roles? : sql server security
Difference between report and query parameter.
What is the difference between implicit and explicit transaction?
What are the different types of indexes?
Can a function call a stored procedure in sql server?
What is row-level compre?
What happens if ntwdblib.dll is missing on your machine?