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 / vijayplsql@gmail.com

For 1,3,5,7...

select * from emp where (rowid,1) in (select rowid,mod
(rownum,2) from emp);

For 2,4,6,8,...

select * from emp where (rowid,0) in (select rowid,mod
(rownum,2) from emp);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Command line parameters in PLSQL.?

1126


Explain difference between cross join and full outer join?

1005


What is master database? : SQL Server Architecture

1018


What happens if null values are involved in arithmetic operations?

1011


What is the stuff and how does it differ from the replace function?

1129


Explain what are the different index configurations a table can have?

1109


Can we return Data from 4(more than 1) tables in stored procedure?

1057


In what sequence sql statement is processed?

1012


Explain what is use of dbcc commands?

1057


What is the process of normalization?

1122


What is query cost in sql server?

995


What is truncate table?

936


explain different types of joins? : Sql server database administration

985


Why olap is used?

968


Explain error and transaction handling in sql server?

1010