Shruti sharma
Shruti sharma

Reputation: 211

appending schema name in query in oracle database

I have one enviornment in which queries containing more than 100 tables. now i need to access same query in read only environment. so i need to use <schema_name>.<table_name> in read only env. This is read only env so i can not create synonyms for all.

instead of writing schema name in prefix of each table, Is there any short cut for it. i am just guessing if anything is possible? They all belongs to same schema.

Upvotes: 0

Views: 453

Answers (1)

PandaCheLion
PandaCheLion

Reputation: 476

Try this out. It will set your session environment to the specified schema and as consequence, no need to provide the <schema_name> prefix.

ALTER SESSION SET CURRENT_SCHEMA = <schema_name>;

Upvotes: 1

Related Questions