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 / 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 is the use of partition by in sql server?

969


What is sql profiler. What are the default templates with it? : sql server database administration

1106


What is inner join? Explain with an example?

1286


What is the maximum rows in sql server table?

964


What are the differences between char and nchar in ms sql server?

1144


When I run the sql server 2000 setup, it just hangs. What do I do?

1129


What is exclusive locks?

1012


Which joins are sql server default?

1071


What are the database roles? : sql server security

1278


Difference between report and query parameter.

1144


What is the difference between implicit and explicit transaction?

1052


What are the different types of indexes?

1159


Can a function call a stored procedure in sql server?

1003


What is row-level compre?

1051


What happens if ntwdblib.dll is missing on your machine?

1188