O'Reilly logo

Oracle Advanced PL/SQL Developer Professional Guide by Saurabh Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

VPD implementation—demonstrations

We will demonstrate two ways of VPD implementation. While the first method is simple association of a policy, the second demonstration uses an application context for the same. Before we get into the actual implementation, let us have a look at the employees table. Notice the explain plan for the SELECT query:

/*Select the EMPLOYEES table data*/
SQL> SELECT *
FROM employees
/
VPD implementation—demonstrations
/*Generate the explain plan for the above query*/
SQL> EXPLAIN PLAN FOR SELECT * FROM employees;
Explained.
/*Display the explain plan*/
SQL>SELECT * FROM TABLE(dbms_xplan.display);

We will take up the same scenario of employees where the employee ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required