oracle 序列如何建同义词

时间:2020-10-21 21:31:50   收藏:0   阅读:41
create user lych0001 indentified 123456;
create user lych0002 indentified 123456;
grant connect,resource to lych0001;
grant connect,resource to lych0002;
grant create create synonym to lych0001;
grant create public create synonym to lych0001;

login on lych0001

create sequence seq001
start with 1
increment by 1
maxvalue 300
nocycle
cache 10;

         create public  synonym  seq001 for lych0001.seq001;
         grant select on  seq001 to lych0002;

         此时lych00002用户便可以使用seq001的sequnence了
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!