0

I need to create a table in oracle DB that the index is increasing by 1 on insertion.
I have the code that does it, first create table, then create sequence and finally create the trigger.
when I type them, one by one, into the Oracle SQL Developer, paste the create table lines and commit, then the rest, one by one, it works, but if i father them all, and click run script, it does not create the sequence + trigger. only the table.

i separate the commands with /
any other thoughts ? or reference to working script ?

thanks !

2
  • Maybe this can help stackoverflow.com/questions/288988/… Commented Nov 6, 2012 at 18:18
  • You need to provide the script you're attempting to run if you want to get any meaningful assistance. Commented Nov 6, 2012 at 20:54

1 Answer 1

1

I suppose you don't need the / in a script. Just use ; to separate statements.

create table ... ;

create sequence ... ;

create trigger ... ;

I think this should be enough to run in SQL Developer and sqlplus.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, on SQL Developer it worked fine without begin/end on every statement. just wrote the lines and separated with ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.