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 / tiru

select * from
(select emp.ename, emp.age, (rownum+1) AS XX from employee
emp )
where remainder(XX,2) = 0;

select * from
(select emp.ename, emp.age, (rownum+1) AS XX from employee
emp )
where remainder(XX,2) = 1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain different types of lock modes in sql server 2000?

941


what is a transaction? : Sql server database administration

1004


How to check table values in sql server?

962


Explain the types of indexes.

1228


What is CTE in SQL

953


What is cross join in sql server joins?

1155


Explain how to maintain a fill factor in existing indexes?

1004


How many triggers you can have on a table?

1007


Do you know what are various aggregate functions that are available?

1138


Can we create clustered index on composite key?

1096


what is a join and explain different types of joins? : Sql server database administration

967


what is bit datatype? : Sql server database administration

927


How do I perform an unattended install of sql server 2000?

1092


What is instead of dml trigger?

1014


what is denormalization? : Sql server database administration

937