second is with use of cursor.
Both codes are available below down.
With Simple Statement:
DELETE FROM EMP
WHERE EMP_CODE= 101;
With Cursor:
DECLARE
CURSOR C1 IS SELECT EMP_CODE,EMP_SALARY FROM EMP;
BEGIN
FOR I IN C1
LOOP
DELETE FROM EMP_SAL
WHERE EMP_CODE = I.EMP_CODE;
END LOOP;
END;
No comments:
Post a Comment
Thank You For Comment