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
Is it possible to create startup or shutdown trigger for on-schema?
How do you take the union of two tables in sql?
How exception handling is done in advance pl/sql?
How to pronounce postgresql?
what are aggregate and scalar functions? : Sql dba
Explain the structure of pl/sql in brief.
What is the use of sql trace?
Explain how to use transactions efficiently : transact sql
what is datawarehouse? : Sql dba
What is java sql connection?
What does joining a thread mean?
How many types of triggers are there in pl sql?
How do I start sql from command line?
What are the two types of exceptions.
How can you load multi line records? : aql loader