(转)oracle中schema指的是什么?
时间:2021-07-01 10:21:17
帮助过:61人阅读
[sql] view plain
copy print?
- SQL> Gruant dba to scott
-
- SQL> create table test(name char(10));
- Table created.
-
- SQL> create table system.test(name char(10));
- Table created.
-
- SQL> insert into test values(‘scott‘);
- 1 row created.
-
- SQL> insert into system.test values(‘system‘);
- 1 row created.
-
- SQL> commit;
- Commit complete.
-
- SQL> conn system/manager
- Connected.
-
- SQL> select * from test;
- NAME
- system
-
- SQL> ALTER SESSION SET CURRENT_SCHEMA = scott;
- Session altered.
-
- SQL> select * from test;
- NAME
- scott
-
- SQL> select owner ,table_name from dba_tables where table_name=upper(‘test‘);
- OWNER TABLE_NAME
- SCOTT TEST
- SYSTEM TEST
--上面这个查询就是我说将schema作为user的别名的依据。实际上在使用上,shcema与user完全一样,没有什么区别,在出现schema名的地方也可以出现user名。
(转)oracle中schema指的是什么?
标签:font href strong cluster link sdn 区分 bsp create