Program for rakesh and ashwin

Program for rakesh and ashwin - (EMPREC EMP%ROWTYPE,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
define --The DEFINE command sets an explicit value --Use the DEFINE command to EXPLICITLY create substitution variables: define VAR = 6000 declare myvar number:=&VAR; BEGIN myvar:=myvar/2; DBMS_OUTPUT.PUT_LINE(myvar); END; --CURSOR WITH RECORD set serveroutput on declare TYPE MYTYPE IS RECORD
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (EMPREC EMP%ROWTYPE, DEPTREC DEPT%ROWTYPE); MYVAR MYTYPE; CURSOR C1 IS SELECT E.ENAME,D.DNAME FROM EMP E,DEPT D WHERE E.DEPTNO=D.DEPTNO; BEGIN FOR MYVAR IN C1 LOOP EXIT WHEN C1%NOTFOUND; DBMS_OUTPUT.PUT_LINE(MYVAR.ENAME||' '|| MYVAR.DNAME); END LOOP; END;...
View Full Document

Ask a homework question - tutors are online