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 data modification?

697


What are the basic features of a trigger in ms sql server?

791


What is it unwise to create wide clustered index keys?

750


What are the steps to insert a table?

698


what is a live lock? : Sql server database administration

630






What functions can a view be used to performed?

794


How to implement service broker?

701


What is the language structure to add a record to a table?

760


Tell about MOM Tool(Microsoft Operator Manager)?

1593


Explain the properties of a relational table?

752


how do you determine the Load performance of any query in sql server {example how do u determine performance of a select stmnt which returns Dynamically many no of records ... some times 100,1000,10000 etc., }

2030


What number sorts of privileges are accessible in sql?

745


What is log in sql server?

759


What is difference between oltp and olap?

780


What is transaction server distributed transaction?

724