View Single Post
  #2 (permalink)  
Old 04-22-2008, 07:59 AM
Unregistered
 
Posts: n/a
Default ANY answer. Re: odd/even record display

Hi guys

I m ALI an oracle developer from Pakistan

for odd records:

[sql]SELECT * FROM emp WHERE ROWID IN ( SELECT DECODE(MOD(ROWNUM,2),1,ROWID) FROM emp );[/sql]


for even;

[sql] SELECT * FROM emp WHERE ROWID IN ( SELECT DECODE(MOD(ROWNUM,2),0,ROWID) FROM emp );[/sql]


try this hope problem will b solved


thanks

remeber me in pray

Last edited by ben : 06-18-2008 at 02:31 PM. Reason: pretty code
Reply With Quote