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


Please Help Members By Posting Answers For Below Questions

between cast and convert which function would you prefer and why?

727


How many full-text indexes can a table have?

719


What is row_number()?

771


Explain indexes disadvantages?

749


How can change procedure in sql server?

712






Can you index views?

674


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

721


Why should one not prefix user stored procedures with ‘sp_’?

807


What is the purpose of the tempdb database?

747


Can you explain what are commit and rollback in sql?

682


How to fine-tune reports?

211


Explain the types of indexes.

836


What does set rowcount do?

689


how you can move data or databases between servers and databases in sql server? : Sql server administration

688


How sql server enhances scalability of the database system?

778