--同义词 作用
--1 隐藏对象的名称和它的所有者
--2 提供对象的公共访问
--3同义词分类 1 公有同义词 2私有同义词
create table this_table_student(
sid integer primary key
)
insert into this_table_student values(‘11‘);
insert into this_table_student values(‘12‘);
insert into this_table_student values(‘13‘);
select *from this_table_student;
commit;
--赋权
grant create synonym to scott;
grant create public synonym to scott;
--创建私有同义词
create or replace synonym tmts for this_table_student;
select *from scott.this_table_student;
select *from tmts;
--创建公有同义词
create or replace public synonym pbtmts for this_table_student;
select *from this_table_student;
select *from pbtmts ;
insert into pbtmts values(4);
时间: 2024-10-08 15:26:56