Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Equivalent for AUTHID CURRENT_USER in view

513187Aug 4 2010 — edited Dec 7 2010
Hi, I'm facing a problem with a view which belongs to user a and I would like to select tables from user b.

Exemple :

user a - table MYTAB

user b - table MYTAB

done by user a : "create or replace view MYVIEW as select * from MYTAB"

grants and synonyms done for both users

if I execute from user b : "select * from MYVIEW", I get the data from a.MYTAB, not b.MYTAB

What can I do to force MYVIEW to select from current user's table ? (juste like the AUTHID CURRENT_USER for procs)

Do I have to create the view in all schemas ?

Thx in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2011
Added on Aug 4 2010
11 comments
4,852 views