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 difference between WHERE AND IN?
OR
1. SELECT * FROM EMPLOYEE WHERE EMPID=123
2. SELECT * FROM EMPLOYEE WHERE EMPID IN (123)
WHAT IS THE DIFFERENCE?

Answer Posted / aditya bisoi

Actually Both Query will return Same Result....
But Performance wise 1st Query better..Bcz it will return the Exact Record with out check hole record in the table....

But when we use IN operator then the sql engine will do the Table scan and retrive the Result...

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain partitioned view?

1131


explain declarative management framework (dmf) in sql server 2008?

1042


How do I create a partition table in sql server?

1181


What are the advantages of the mirroring?

1147


What are the restrictions applicable while creating views? : SQL Server Architecture

1082


How many tables can be joined in SQL Server?

1111


what is an index? : Sql server database administration

1022


You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?

1035


Why olap is used?

1032


What are the joins in sql server? : sql server database administration

1050


Explain system scalar functions?

1043


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

1325


What is sql service broker?

1021


How you provide security to cube? : sql server analysis services, ssas

1008


What is difference between views and tables?

1076