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...

how to write the query to select the rows are in the order
of either 1,3,5,7... or 2,4,6,8,...

Answer Posted / md. niyaz

For: 2, 4, 6, ......

select * from <Table_Name> where <Column_Name> % 2 = 0

==============Niyaz====================================

For: 1, 3, 5, ......

select * from <Table_Name> where <Column_Name> % 2 = 1

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the osql utility?

984


How do I view a stored procedure in sql server query?

936


What is difference between equi join and natural join?

1050


What are the different types of replication are there in sql server 2000?

1046


Explain a checkpoint?

1045


Can you leave a union at any time?

1068


What is the difference between dbcc indexdefrag and dbcc reindex?

989


What are types of subqueries?

1074


How to transfer data from a cursor to variables with a "fetch" statement?

1105


If user is owning any SQL Objects, can we drop that user

2086


Define synonym?

1182


How to use old values to define new values in update statements in ms sql server?

1280


Explain what is dbcc?

1017


What is tcl in sql server?

1131


What is the difference between count () and rowcount ()?

1035