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

What is the difference between formal parameters and actual parameters?

1006


What is difference between cartesian join and cross join?

1018


How will you differentiate between varchar & varchar2?

993


Why packages are used in oracle?

1002


What is the difference between online and offline backups?

974


Why use resource manager in Oracle?

1052


What are the types of partitions in oracle?

976


HI, Please let me know the syllabus for Oracle OCA and OCP Certification

2434


How can I combine multiple rows into a comma-delimited list in oracle?

1001


How to declare a local variable?

1055


What is a database schema in oracle?

1055


What is a table in oracle?

928


How do I use unicode codesets with the weblogic jdriver for oracle driver?

1015


What operating systems are supported by oracle database 10g xe?

985


How to change program global area (pga) in oracle?

1034