当前位置:Gxlcms > 数据库问题 > oracle 同义词

oracle 同义词

时间:2021-07-01 10:21:17 帮助过:26人阅读

--同义词 作用
--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);


oracle 同义词

标签:sid   ace   comm   insert   --   隐藏   sel   ble   作用   

人气教程排行