Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Ways to fake table in own scema.
Although I recommend that you use synonyms, there is another way. This way
is only good for a single session. You can issue this statement at any time
though you want to use a particular schema other than your own.
SQL> alter session set current_schema="USER1";
From that point on all references will be to schema one. Note this doesn't change what the function user returns, so the following will stay the same.
SQL> select user from dual;
user2
G. Mjoen <gm_at_offline.no> wrote in message
news:37c67e9a.192354751_at_info.telenor.no...
> I have a user (USER1) with a lot of tabes. I created a new user
> (USER2) with no tables in his/hers schema. USER2 is granted select on
> all of USER1's tables.
>
> The problem is:
>
> USER2 needs to write 'select * from USER1.TABLE1' instead of 'select *
> from TABLE1'.
>
> I am able to fix this by creating a synonym for each table. Is there
> som other way of doing this?
>
> --
> Gaute
Received on Mon Aug 30 1999 - 19:16:16 CDT