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

Explain having clause and where clause?

991


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

1625


What are the grouping functions?

891


What are the new features of sql server 2008 r2 reporting service?

193


How to stop log file growing too big?

956


How to enter date and time literals in ms sql server?

954


Can a table have 2 primary keys?

933


What is difference statement and preparedstatement?

936


What is the difference between clustered and a non-clustered index?

979


How we can refresh the view?

1058


How to rebuild master databse?

1032


What is a unique index?

887


What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?

911


Explain the properties of sub-query in sql server?

956


What command do we use to rename a db, a table and a column?

876