IN Vs OR operator which is best to use sql server.
Answer Posted / harinireddy
in is peferable bcoz
by using in we can write set of values at time n check it
where as when we use or we need to mention for each n every
value
like ...
select emp_id from employee where emp_id in(1,2,3,4..)
but in case of or...
select emp_id from employee where emp_id=1 or emp_id=2 or
emp_id=3 or emp_id=4...
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is difference between clustered and non clustered index?
How we can compare two database data?
What is microsoft sql server?
What is sharding?
Benefits of Stored Procedures?
How do I uninstall sql server 2014?
what is a sub-report?
What is cte (common table expression)?
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
Explain the steps to use transact-sql cursor?
What is difference between after and before?
What do you mean by an execution plan? How would you view it?
What are the advantages of passing name-value pairs as parameters?
What are the requirements for sql server 2016?
Explain relational data?