Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 assign new column names in a view?

909


Why can there be only one clustered index and not more than one?

986


How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?

1999


What are the different types of Indexes available in SQL Server?

982


What is replication and database mirroring?

1028


What are the reporting services components?

142


How to use old values to define new values in update statements in ms sql server?

1243


What does REVERT do in SQL Server 2005?

943


How will you find out if there are expensive SQL statements running or not?

1001


How to drop an existing schema in ms sql server?

1078


What is indexing explain it with an example?

991


Can two tables share a primary key?

1004


What do we need queues in sql service broker?

1051


What are magic tables in sql server?

1115


When you use @@error and try-catch?

1028