0
votes

I need to create public synonyms for sequence.Could you please suggest how to create synonyms for sequence in oracle 11g.

Alter script to add constraint: ALTER TABLE schema.table_name ADD( CONSTRAINT pk PRIMARY KEY(primaryKey_ID));

Sequence: CREATE SEQUENCE table_name START WITH 1;

1
I removed the MySQL tag. - Tim Biegeleisen
I noticed you posted 21 questions and never accepted an answer. Haven't you ever had a good answer or there's another reason why you never accept an answer? - Aleksej
I have accepted your answer when i got response from you - user1679378
Something on accepting an answer. It is both a way to mark the question as closed, because it's got a good answer, and to say thanks to people who helped you. I believe you should consider accepting the good answers you received in your questions. - Aleksej

1 Answers

4
votes

According to documentation you can create a public synonym for your sequence in the same way you do for a table:

create public synonym table_name for yourSchema.table_name;
create public synonym sequence_name for yourSchema.sequence_name;