Variable attributes, Flow control Statements
Ø Variable attributes 1. Column type variable Sname student.Sname%type; 2. Row type variable i student%rowtype; Ø CASE expression Declare V_dname varchar2(20); V_deptno number; Begin Select deptno into V_deptno from emp where empno=:p_empno; Case V_deptno When 10 then V_dname:=’Accounting’; When 20 then V_dname:=’RESEARCH’; When 30 then V_dname:=’SALES’; Else V_dname:=’UNKNOWN’; End case; Display(‘Emp department is ‘||V_dname); End; Ø Flow control statements 1. Conditional control statements ( if, if..else, i...