To fetch ALTERNATE records from a table.
(EVEN NUMBERED)
create
table emp (emp number,
fname varchar2(20));
table created.
insert
into emp (emp,fname)
values (100,
'prasanths')
insert
into emp (emp,fname)
values (101,
'praveen11111')
insert
into emp (emp,fname)
values (102,
'mani')
insert
into emp (emp,fname)
values (103,
'dani')
select * from emp where rowid in (select decode(mod(rownum,2),0,rowid, null) from emp);
No comments:
Post a Comment