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


Please Help Members By Posting Answers For Below Questions

How to find the service pack installed? : sql server database administration

643


Explain data warehousing in sql server?

691


What are the drawbacks of reporting in ssrs?

118


Write down the syntax and an example for create, rename and delete index?

622


What is 1nf 2nf?

655






What is the difference between a fill factor of 100 and 0?

619


What is a print index?

579


How to create a new login name in ms sql server?

636


What is order of B+tree?

761


Explain about sql server login?

689


What do you understand by the analysis services in sql server?

628


What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks

1713


What command is used to delete a table from the database in the sql server and how?

634


How to modify an existing stored procedure in ms sql server?

632


explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?

2086