Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is difference between equi join and inner join?

918


Where can you add custom error messages to sql server?

1096


What is dynamic cursor in SQL SERVER?

1056


What are cursors and when they are useful?

1072


What is the language structure to add a record to a table?

1008


What is partitioned view?

886


explain databases and sql server databases architecture? : Sql server database administration

942


What are triggers? How do you invoke a trigger on demand?

1296


How each E-R model constructs can be mapped to the relational model?

984


Why it is recommended to avoid referencing a floating point column in the where clause?

948


Explain about builtinadministrator?

1036


Can a function call a stored procedure in sql server?

939


What is the difference between grant and with grant while giving permissions to the user?

940


What are the different types of join?

1144


What are the different types of subquery?

1133