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?

Answers were Sorted based on User's Feedback



What is the difference between WHERE AND IN? OR 1. SELECT * FROM EMPLOYEE WHERE EMPID=123 2. SELE..

Answer / guest

Here both is same but some situvations we want extact value
of one are more values then use in oprate

Is This Answer Correct ?    0 Yes 0 No

What is the difference between WHERE AND IN? OR 1. SELECT * FROM EMPLOYEE WHERE EMPID=123 2. SELE..

Answer / vandana chand

where allows only single value in where Clause.
where as IN operator allwos multiple values in Where clause.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between WHERE AND IN? OR 1. SELECT * FROM EMPLOYEE WHERE EMPID=123 2. SELE..

Answer / vandana chand

where allows only single value in where Clause.
where as IN operator allwos multiple values in Where clause.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between WHERE AND IN? OR 1. SELECT * FROM EMPLOYEE WHERE EMPID=123 2. SELE..

Answer / ved

EMPID=123 will show only one row....if you want to see multiple row then use EMPID IN (1,2,3)


Pratically Done.

Is This Answer Correct ?    3 Yes 5 No

What is the difference between WHERE AND IN? OR 1. SELECT * FROM EMPLOYEE WHERE EMPID=123 2. SELE..

Answer / saiteja

there is no difference among them.

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More SQL Server Interview Questions

What is sql server 2000 work load governor?

0 Answers  


How do I install only the client tools of sql server 2000?

0 Answers  


what is the system function to get current user's user id? : Sql server database administration

0 Answers  


What is the difference between dataadapter and datareader?

0 Answers  


How to get the query of a table in sql server?

0 Answers  






What is dbcc command in sql server?

0 Answers  


What are key constraints?

0 Answers  


Explain the difference between function and stored procedure?

0 Answers  


wat new abt truncate in sql server

2 Answers   HCL, HP,


Can you use order by when defining a view?

0 Answers  


What is the default Port No on which SQL Server listens?

0 Answers  


What is the recovery model? List the types of recovery model available in sql server?

0 Answers  


Categories