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
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.
How to execute a stored procedure in ms sql server?
Which are the important points to note when multilanguage data is stored in a table?
Working with TLogs
How can you list all the columns in a database?
What objects does the fn_my_permissions function reports on? : sql server security
What is the difference between indexing and hashing?
Explain what are the authentication modes in sql server?
Can we call future method from trigger?
What is a linked server in sql server?
What are the different SQL Server Versions you have worked on?
How to use linked server?
What are the reporting services components?
How to create user messages with print statements in ms sql server?
how to create a scrollable cursor with the scroll option? : Sql server database administration