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 is a mixed extent? : Sql server administration
why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration
how to invoke a trigger on demand? : Sql server database administration
How do I open port 1433?
What are the advantages of sql azure?
Can group by be used without aggregate functions?
What are various aggregate functions that are available?
What are cascading parameters in ssrs reports?
What is inline table-value user-defined function?
What is thr feature of change data capture?
Explain error and transaction handling in sql server?
Can you pass expressions to function parameters?
Difference between group by clause and having clause in SQL?
Is mysql better than sql server?
Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?