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

Equi join and non equi join is possible with sql server?

1022


What is table value parameters (tvp)?

1101


Explain differentiate between a having clause and a where clause?

912


What are dml triggers and types of dml triggers?

981


What is microsoft sql server?

974


How do I start and stop sql server?

1020


What is data source object?

999


What are alternate keys?

979


What are extended events in sql server?

955


Can I use sql azure as a backup with log shipping or database mirroring?

156


Why I am getting this error when renaming a database in ms sql server?

1052


What is xml datatype?

1074


What is replication and database mirroring?

1047


can you implement data mining in SSRS?

148


What is report snapshot?

161