Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieving data without specifying table owner
Jeff Van Dusseldorp <jeff.van_at_bigfoot.com> wrote in message
news:lFBW3.4468$T4.1217661_at_news1.rdc1.on.wave.home.com...
> I'm working on the conversion of a SQL Anywhere database to Oracle. In SQL
> Anywhere, if you select from a table name and don't specify the owner, it
> will still find the table as long as it is visible to you.
>
> Now, good programming technique would probably insist that you specify the
> table owner in each select anyway, but I'm left with miles of legacy code
> that didn't. If I can avoid rewriting each SQL script, it would make me
> happy.
>
> Is there anyway to make Oracle find the tables without specifying the owner
> name.
>
You can change the default schema (user) with: alter session set current_schema = your_schema;
If you don't specify the schema, your_schema will be used as the default.
This works at least for Oracle 8i (I couldn't find it in the oracle 8.0.x manual).
Greetings,
Hans.
Received on Mon Nov 15 1999 - 19:18:43 CST