How I can return status of a procedure i.e. sucess or failure in PLSQL, please provide me some example.
CREATE OR REPLACE PROCEDURE Main (status OUT VARCHAR2)
IS
TYPE employees_aat IS TABLE OF employees%ROWTYPE;
l_employees employees_aat;
BEGIN
SELECT *
BULK COLLECT INTO l_employees
FROM employees
ORDER BY last_name DESC;
DBMS_OUTPUT.put_line (l_employees.COUNT);
FOR indx IN 1 .. l_employees.COUNT
LOOP
DBMS_OUTPUT.put_line (l_employees (indx).last_name);
END LOOP;
END;
/