How to Select 38th row details in table without using rownum ?

Answer Posted / jilani555

declare
cursor c is select * from emp;
s number:=0;
begin
for i in c loop
s:=s+1;
if s=6 then
dbms_output.put_line(i.empno||' '||i.ename||' '||i.sal);
end if;
end loop;
end;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi guys, I have four tables those are emp,dept,eliminate and uneliminate. i wrote small cursor..when i run, it display one error (ORA-01403 nodata found)... The query is: Declare cursor c1 is select e.ename emp_name from emp e,dept d where e.deptno=d.deptno group by deptno; r1 c1%rowtype; test_emp varchar2(200); begin for r1 in c1 loop begin select eliminate_emp into test_emp from eliminate t,uneliminate ut where t.number=ut.number and t.deptno=e.deptno and rownum<1; end; dbms_output.put_line(r1.emp_name); end loop; end; Thanks...

2463


IMP-00070: Lob definitions in dump file are inconsistent with database.

1483


IMP-00064: Definition of LOB was truncated by export

6134


ORA-26084: direct path context already finished

1685


Hi guys, I have four tables those are emp,dept,eliminate and uneliminate. i wrote small cursor..when i run, it display one error (ORA-01403 nodata found)... The query is: Declare cursor c1 is select e.ename emp_name from emp e,dept d where e.deptno=d.deptno group by deptno; r1 c1%rowtype; test_emp varchar2(200); begin for r1 in c1 loop begin select eliminate_emp into test_emp from eliminate t,uneliminate ut where t.number=ut.number and t.deptno=e.deptno and rownum<1; end; dbms_output.put_line(r1.emp_name); end loop; end; Thanks...

2310


ORA-26094: stream format error: input column overflow

2552


ORA-26082: load of overlapping segments on table string.string is not allowed

1546


IMP-00063: Warning: Skipping table "string"."string" because object type "string"."string" cannot be created or has different identifier

2497


ORA-26079: file "string" is not part of table string.string

1706


when i ran any workflow or session, getting below error: seesion task instance[s_xxx]: Execution terminated unexpecterdly

1956


ORA-26095: unprocessed stream data exists

3258


invalid quantity specification negative quantity are not allowed for this item please check this item definition quantity

3114


ORA-26030: index string.string had string partitions made unusable due to:

1721


ORA-16627: No standby databases support the overall protection mode.

3756


ORA-16516: The current state is invalid for the attempted operation.

8428