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

What stored by the model?

1064


Can we insert data into a view?

1143


Where sql server usernames and passwords are stored in a sql server?

989


What is the usage of the sign function?

1116


Should you normalize audio?

944


What is bulkcopy in sql?

948


What is it unwise to create wide clustered index keys?

1007


What is a primary key?

954


Can you use order by when defining a view?

979


Can primary key be a foreign key?

1060


How to create a Master database in SQL server ?

1095


Can we create clustered index on composite key?

1088


How will you decide the active and passive nodes?

1133


You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

995


What is the query and subquery?

1079