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...

Display Odd/ Even number of records?

Answer Posted / swastik mohanty

--TO FIND EVEN NUMBER
SELECT * FROM Table
WHERE ROWID IN (SELECT DECODE(MOD(ROWNUM, 2), 0, ROWID, NULL) FROM Table);
--TO FIND ODD NUMBER
SELECT * FROM Table
WHERE ROWID IN (SELECT DECODE(MOD(ROWID, 2), 1, ROWID, NULL) FROM Table);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a table interactively?

1064


how the indexes are stored in the Oracle Database?

2257


Where is the export dump file located?

1128


Explain the use of compress option in exp command.

1004


How to work with data objects interactively?

959


How to pass parameters to procedures in oracle?

1024


Explain the dml?

958


Describe varray?

1038


What is the difference between online and offline backups?

1038


What are a collation and state the different types of collation sensitivity?

1150


Can you drop an index associated with a unique or primary key constraint?

1000


What is the oracle implicit cursor?

1036


How translate command is different from replace?

1059


What are set operators?

1062


How to define an external table with a text file?

1046