How to build synonyms for oracle sequence

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了

Guess you like

Origin blog.51cto.com/2012ivan/2542749