Oracle Magazine, July/August 2017
Database Developer PL SQL ORACLE MAGAZINE JULY AUGUST 2017 75 AS BEGIN DBMS_ OUTPUT put_ line Employees in Department department_ id_ in FOR rec IN SELECT e last_ name e email FROM hr employees e WHERE e department_ id department_ id_ in ORDER BY e last_ name LOOP DBMS_ OUTPUT put_ line rec last_ name rec email END LOOP END Ill let everyone execute the procedure GRANT EXECUTE ON show_ employees TO PUBLIC No other schemas have been granted SELECT on employees so if for example a user connected to the SCOTT schema tries to execute this procedure that person will see an error BEGIN hr show_ employees 10 END
You must have JavaScript enabled to view digital editions.