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 / dinesh sharma
In WHERE Clause when the condition match no further scan of
table stop scanning the table after condition match.
where as IN operator It scan the full table either condition
match or not.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?
Explain a join?
Does server sql treat char as a variable-length or fixed-length column?
How to sort query output in descending order in ms sql server?
what's the difference between delete table and truncate table commands? : Sql server database administration
What is microsoft sql server?
How to change the ownership of a schema in ms sql server?
Create and insert into temp table in sql server?
What are trace flags and mention a few common trace flags used with sql server?
What is nolock?
what is sql server? : Sql server database administration
What is t-sql script to take database offline – take database online.
How can you check the level of fragmentation on a table?
What is encryption key?
Tell me what is the order in which the sql query is executed?