Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieving data without specifying table owner

Re: Retrieving data without specifying table owner

From: Hans Bos <hans.bos_at_xelion.nl>
Date: Tue, 16 Nov 1999 02:18:43 +0100
Message-ID: <80qbgu$dmk$1@porthos.nl.uu.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US