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
Explain can you implement data mining in ssrs?
What is primary key, unique key, and foreign key?
What is your recommendation for a query running very slow? : sql server database administration
Explain transaction server distributed transaction?
What is the correct order of the logical query processing phases?
What are different types of table joins?
What is the report builder?
What stored by the master?
Tell me what is log shipping?
Explain encryption of entire databases without the need for application changes in sql server 2008?
What sql server means?
How to stop a loop early with break statements in ms sql server?
What is tempdb database? : SQL Server Architecture
What is #table in sql server?
How to create a dml trigger using create trigger statements?