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
What is the difference between formal parameters and actual parameters?
What is difference between cartesian join and cross join?
How will you differentiate between varchar & varchar2?
Why packages are used in oracle?
What is the difference between online and offline backups?
Why use resource manager in Oracle?
What are the types of partitions in oracle?
HI, Please let me know the syllabus for Oracle OCA and OCP Certification
How can I combine multiple rows into a comma-delimited list in oracle?
How to declare a local variable?
What is a database schema in oracle?
What is a table in oracle?
How do I use unicode codesets with the weblogic jdriver for oracle driver?
What operating systems are supported by oracle database 10g xe?
How to change program global area (pga) in oracle?