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


Please Help Members By Posting Answers For Below Questions

what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

1663


How can sql injection be stopped? : sql server security

625


you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration

624


What is the fastest way to permanently delete a 1 million row table named customers?

734


When a primary key constraint is included in a table, what other constraints does this imply?

686






What is the purpose of object explorer and its features? : sql server management studio

713


What is the definition for sql server 2000?

686


What are four major operators that can be used to combine conditions on a where clause?

679


Can you name a few encryption mechanisms in sql server?

602


What is indexing in sql server with example?

589


Explain SSRS Architecture?

145


Why use identity in sql server?

636


What is the difference between seek predicate and predicate?

665


What are the lambda triggers?

568


Explain important index characteristics?

658