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
How to open and close an explicit cursor in oracle?
HI, Please let me know the syllabus for Oracle OCA and OCP Certification
How can I create database in oracle?
I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.
Can we call procedure inside function in oracle?
various types of hints and their usage
What happens if the imported table already exists?
Explain the use of control file?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
what is the scripts in data base?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
What is an oracle database?
How to write a query with a left outer join in oracle?
What is an oracle table?
Which environment variables are absolutely critical in order to run the OUI?