Skip to Main Content

Oracle Database Discussions

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!

Can I change the default schema from "sql"

386285Jan 24 2003 — edited Apr 16 2003
I wish to switch between several sets of identical tables under different schemas/owners in the same database - say dev1, dev2, test, prod schemas.

The (single) user I connect with (say - called Reader1) has granted select to all these tables, and now i wish to do something like:

alter session set schema='dev1'
;
select count(*) from customers
;
select count(*) from sales
;
alter session set schema='test'
;
select count(*) from customers
;
select count(*) from sales
;

The database should then translate it to something like:

select count(*) from dev1.customers
;
select count(*) from dev1.sales
;
select count(*) from prod.customers
;
select count(*) from prod.sales
;

Is this possible or does anyone have alternative suggestions ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2003
Added on Jan 24 2003
10 comments
361 views