How One can easily select all even, odd, or Nth rows from a
table using SQL queries?
Answer Posted / mahesh
SIMPLE ODD AND EVEN...
SQL> SELECT ROWNUM FROM EMP GROUP BY ROWNUM HAVING MOD(ROWNUM,2)=1
2 /
ROWNUM
----------
1
3
5
1* SELECT ROWNUM FROM EMP GROUP BY ROWNUM HAVING MOD(ROWNUM,2)=0
2 /
ROWNUM
----------
2
4
Goahead...
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does trigger mean in slang?
define sql delete statement ? : Sql dba
Is like operator in sql case sensitive?
What is rank dense_rank and partition in sql?
Differentiate pl/sql and sql?
what is the bond code in materialized view?
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)
How do I run a pl sql program?
Is inner join faster than left join?
Why select is used in sql?
Explain the difference between sql and mysql.
What are all the common sql functions?
What is count * in sql?
What are all the different normalization?
What is int identity in sql?