简体   繁体   中英

Oracle Database schema name

How do i set the db name on my worksheet so i don't have to retype every time I write a query.

Here is one example.

SELECT db_t.employee FROM table1;

I am trying not to type db_t every time. Is there a way I can set a db name for a session.

使用以下命令设置会话的默认架构:

alter session set current_schema = db_t;

There is default database for a current session only.It can be set by- USE ;

Ex: USE db_t;

Post above statemnet, the sqls can be run without schema name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM