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 do I create a trace in sql server?

512


Why can there be only one clustered index and not more than one?

543


1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?

1534


what are triggers? : Sql server database administration

497


What is #temp and @table variable in SQL server?

576






What is the difference between stored procedure and functions?

593


What are the main differences between #temp tables and @table variables and which one is preferred?

547


How many clustered indexes there can be on table ?

598


Create and insert into temp table in sql server?

581


Define model database?

571


Explain the steps to use transact-sql cursor?

526


What is the process of indexing?

512


what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration

584


How to get the definition of a view out of the sql server?

502


What is the use of group by clause?

525