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

Write a query to find 5th highest amount paid from the customer table.

934


What does top operator do?

1026


What is the difference between left and right outer join?

1066


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

1092


What is cursors?

1192


How do I create a stored procedure in dbml?

1012


What is difference between count (*) and count 1?

932


How do database indexes work?

1014


Explain the properties of subqueries in sql server?

1083


last function used in MS Access to convert sql what function will use in sql

2077


What is CTE in SQL

951


How do you send email on SQL Server?

1068


Can you please differentiate between a primary key and a unique key?

1010


What are the types of containers in ssis?

1172


Explain different forms of normalization?

951