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 / soumya ghosh
Both of them will return the same record
But as per the first sentence of the question, WHERE is a Clause whereas IN is a Operator. That is the difference between both.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is it possible in sql table to have more than one foreign key?
What is report snapshot in ssrs?
How can you know if the row fetched from cursor is still valid in underlying table?
What are the properties of primary key?
How to rebuild master databse?
How can sql server instances be hidden?
What are the different SQL Server Versions you have worked on?
Explain about sql server login?
What is bit data type?
Define master database?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?
When is the use of update_statistics command?
You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?
what are user defined datatypes? : Sql server database administration