DECLARE
ENO NUMBER;
SALARY NUMBER;
BEGIN
ENO :=
&EMPNO;
SELECT SALARY
INTO SAL FROM EMP WHERE EMPNO = ENO;
IF SALARY <
5000 THEN
UPDATE EMP SET
SAL = SAL + SAL *.1 WHERE EMPNO = ENO;
DBMS_OUTPUT.PUT_LINE(‘SALARY
UPDATE’);
ELSE
DELETE FROM EMP
WHERE EMPNO = ENO;
DBMS_OUTPUT.PUT_LINE(‘RECORD
DELETED’);
END IF;
END;
No comments:
Post a Comment