Reputation: 4878
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 !
Upvotes: 0
Views: 152
Reputation: 40894
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.
Upvotes: 1