Tutorials
Oracle 9i
|
DECLARE N NUMBER:=1; BEGIN LOOP DBMS_OUTPUT.PUT_LINE (N); N := N + 1; EXIT When N>5; END LOOP; END; / |
|
DECLARE N NUMBER:=1; BEGIN LOOP DBMS_OUTPUT.PUT_LINE (N); N := N + 1; EXIT When N>5; END LOOP; END; / |

|
declare flag number :=0; n number; i number; begin n:=&n; for i in 2..(n-1) loop if (n mod i)=0 then flag:=1; end if; end loop; if flag=1 then dbms_output.put_line('not a prime'); else dbms_output.put_line( 'is a prime'); end if; end; |

|
declare a number:=0; b number:=1; c number; n number; begin n:=&n; for i in 1..n loop c:=a b; a:=b; b:=c; dbms_output.put_line(c); end loop; end; |
| Great :) |
|
DECLARE CURSOR C1 IS SELECT * FROM EMP; EMP_REC EMP%ROWTYPE; BEGIN OPEN C1; LOOP FETCH C1 INTO EMP_REC; DBMS_OUTPUT.PUT_LINE(EMP_REC.EMPNO ||' '||EMP_REC.ENAME ||' '||EMP_REC.SAL); EXIT WHEN C1%ROWCOUNT >10; END LOOP; CLOSE C1; END; |
| thankyou |
| can anyone help me about the automatic creation of %rowtype... |
| good |