For even numbered rows .
select col_1, col_2
from (select col_1, col_2, rownum rnum
from my_table)
where mod(rnum, 2) = 0
For odd numbered rows ...
select col_1, col_2
from (select col_1, col_2, rownum rnum
from my_table)
where mod(rnum, 2) 0
A from clause select is
select * from (
select rownum,a,b,c from table) x
where mod(x.rownum,2) = 1
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 5:35 PM
Hi lists
can anybody post me to find alternative rows in a table.
1,3,5 ...
How about analysing the table, finding out the total number of rows within
the table, and then using the SAMPLE clause with a value of 50%?
Mark
-Original Message-
Shrinivas (MED, Keane)
Sent: Wednesday, August 29, 2001 16:36
To: Multiple recipients of list ORACLE-L
Hi lists
can
Hi Srini
SELECT * FROM Table
WHERE (rowid, 1)
IN ( select rowid , mod(rownum, 2) from Table )
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 9:05 PM
Hi lists
can anybody post me to find alternative rows in a table.