Skip to Content
0
Mar 13, 2015 at 08:34 AM

One sequence for several tables

202 Views

Hi,

I need to use ONE sequence in the create statement for several tables (it's a partner solution, where we just want to replace the exising DB in the first step).

I created a sequence:

CREATE SEQUENCE ww_seq

START WITH 1

INCREMENT BY 1;

and then I would like to use this sequence in that way as described in the docu

create column table "bla1" (no1 integer generated by default as ww_seq.nextval, text1 varchar(10));

create column table "bla2" (no2 integer generated by default as ww_seq.nextval, text2 varchar(10));

Is this possible? If yes, what is the syntax?

thanks a lot

Wolfgang