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
Can you use order by when defining a view?
What is for xml in sql server?
What is the name of reporting services config file and what’s it’s used for?
Why normalization is used?
What are extended events in sql server?
How many columns can exist together per table?
How does using a separate hard drive for several database objects improves performance right away?
What is ssrs?
How would you use user_constraints table in DB?
How to define output parameters in stored procedures?
Why olap is used?
How to transfer data from a cursor to variables with a "fetch" statement?
What encryption security is available in sql azure?
How many primary keys are possible in a table?
Why I am getting this error when renaming a database in ms sql server?