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

How to use linked server?

1274


What are the advantages of paper records?

1014


what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration

1110


Relational calculus is what type of language?

1100


Explain four layers of abstraction microsoft architectured?

147


What are views in ms sql server?

1121


what is a schema in sql server 2005? : Sql server database administration

1086


How do you set a trace flag in sql server?

1097


What happens when converting big values to numeric data types?

1229


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

1128


Explain about SQLOS?

1064


What are the limitations/drawbacks or ssrs 2008 r2?

152


What is tcl in sql server?

1174


How to update values in a table with update statements in ms sql server?

1068


What are the database roles? : sql server security

1279