Submitted Questions

  • Retrieve Odd and Even Rows

    How to retrieve odd and even number of rows from a table?

    Sabbir

    • Aug 17th, 2015

    What programming language is this? Can you please provide this code in PHP ?

    venkat

    • Jun 27th, 2012

    Code
    1. SELECT * FROM (SELECT rownum rn,col1,col1 FROM table_name) WHERE mod(rn,2)=0
    union all
    Code
    1. SELECT * FROM (SELECT rownum rn, col1,col2 FROM table_name) WHERE mod(rn,2)=1;