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 / jaipal singh

The IN operator allows you to specify multiple values in a
WHERE clause.
if we want to select the persons with a EMPID equal to 1,2
and 3 from the table above.
and simply where clause allow you to select ony whose EmpID
is 123.it is main difference

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between clustered and non-clustered indexes in ms sql server?

487


Explain relational data?

544


Do you know how to store and query spatial data?

602


What are examples of triggers?

610


Explain “row_number()” in sql server with an example?

520






How to install sql server 2005 express edition?

590


What are the functions in sql server?

541


What are drillthrough reports?

102


What are the acid properties?

551


How to connect a database with sql express.?

566


How will you hide an attribute? : sql server analysis services, ssas

520


How do I find the sql server version?

518


Does union all remove duplicates?

607


What is dirty read?

624


Can we use having clause without group by?

554