DECLARE
v_s_id enrollments.stu_id%TYPE:=:stu_id;
v_c_id enrollments.class_id%type:=:class_id;
BEGIN
DELETE FROM enrollments
WHERE stu_id=v_s_id
AND class_id=v_c_id;
IF (SQL%ROWCOUNT<>0) THEN DBMS_OUTPUT.PUT_LINE('The student with the id '||v_s_id||' was deleted from class id '||v_c_id);
ELSE DBMS_OUTPUT.PUT_LINE('The student with the id '||v_s_id||' was NOT deleted from class id '||v_c_id||' CHECK IF IT IS ENROLLED THERE!');
END IF;
COMMIT;
END;