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


Please Help Members By Posting Answers For Below Questions

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?

858


Explain a join?

780


Does server sql treat char as a variable-length or fixed-length column?

785


How to sort query output in descending order in ms sql server?

745


what's the difference between delete table and truncate table commands? : Sql server database administration

672






What is microsoft sql server?

696


How to change the ownership of a schema in ms sql server?

743


Create and insert into temp table in sql server?

779


What are trace flags and mention a few common trace flags used with sql server?

746


What is nolock?

747


what is sql server? : Sql server database administration

696


What is t-sql script to take database offline – take database online.

791


How can you check the level of fragmentation on a table?

772


What is encryption key?

98


Tell me what is the order in which the sql query is executed?

704