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
Write a query to find 5th highest amount paid from the customer table.
What does top operator do?
What is the difference between left and right outer join?
How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?
What is cursors?
How do I create a stored procedure in dbml?
What is difference between count (*) and count 1?
How do database indexes work?
Explain the properties of subqueries in sql server?
last function used in MS Access to convert sql what function will use in sql
What is CTE in SQL
How do you send email on SQL Server?
Can you please differentiate between a primary key and a unique key?
What are the types of containers in ssis?
Explain different forms of normalization?