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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the different ways to return the rowcount of a table?

579


Can you explain the disadvantages/limitation of the cursor?

507


What are the restrictions applicable while creating views? : SQL Server Architecture

588


Can binary strings be used in arithmetical operations?

526


What is the default port for SQL Server over a firewall?

593






What is the purpose of the tempdb database?

575


You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?

644


Why I have to use stored procedures?

600


What is buffer cash and log cache in sql server?

593


How to create a scrollable cursor with the scroll option?

502


What do you mean by data integrity?

601


What is in place upgrade in sql server?

524


How to insert data into an existing table?

571


Can you move the resources after pausing the node? : sql server database administration

596


How to use transact-sql statements to access the database engine?

544