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

Using the customer, and order table in northwind database, please write a query to produce xml?

1067


Explain logical operators in sql server?

1105


What you can do to delete a table without the delete trigger firing?

965


Write a program to fetch first 10 records from a file?

1001


How dts is used to extract, transform and consolidate data?

1069


What is default constraint in ms sql server?

1026


What is the use of RDBMS?

997


How to restore performance issues and how to check?

1997


How to get a list of all tables with "sys.tables" view in ms sql server?

1030


What is the Difference Between Primary and Foreign Key?

1002


What is Sqlpaging in SqlServer 2005 ?

1061


What is rtm version in sql server?

1047


what do you understand by change data capture?

999


Can we insert data into a view?

1129


Explain microsoft sql server functions?

1104