1. Find the error(s), if any, in the following code :
(i) x := y + 200;
if x < 10
Y = 30;
Else if x<40 then
Y :=30
End
(ii) DECLARE
v_empno NUMBER[4];
v_empname varchar2(20);
BEGIN;
SELECT empno, ename, salary
INTO v_empno, V-ename
FROM emp
FOR empno = 1234;
END;
2 . Find the error(s), if any, in the following code :
(i) DECLARE
V_BONUS number default 10;
V_COMMISSION number default 30;
V_STATUS Boolean : = True
BEGIN;
V_BONUS < V_COMMISSION :=V_STATUS;
END;
(ii) DECLARE
v_empno NUMBER[4];
v_empname varchar2(20);
begin Boolean : = True
START
SELECT empno, ename, salary
INTO v_empno, V-ename
FROM emp
FOR empno = 1234 and 2345
END;
3 . Find the error(s), if any, in the following code :
Declare
T number(2) = 0;
I number(2) = 0;
No number(2) = 5;
Begin
Do while I<=10
T:=no*I;
Dbms_output(no||*||I|| = ||t);
I:=I+1;
End loop;
4 . Find the error(s), if any, in the following code :
DECLARE
BONUS NUMBER DEFAULT = 10;
STATUS BOOLEAN:=TRUE
BEGIN;
IF BONUS >1000
PAY=BONUS+1000;
ELSEIF BONUS >2000
PAY= BONUS+1500;
END;
5. Find the error(s), if any, in the following code :
Declare
T char (5) :=*;
I number(2) :=0;
J number(2);
Begin;
While I<=5 loop
J =1;
While j<=I
Dbms_output.put(t);
J:= j+1;
Endloop
I:= I+1;
Endloop
End;