Hi,
A similar kind of data type is available, called SERIAL. You may specify the initial starting number as starting seed number (default 1) One need to pass a fixed value 0 for the serial type columns; so that the database server can generate to next sequence number in ascending order. If you insert any other number, it will be accepted as it is & will be stored in the table. If you need to maintain a unique sequence of numbers; you should implement an unique index on the column.
Example:
create temp table tab1 (f1 serial) with no log ;
insert into tab1 values (0) ;
-- show the generated sequence number.
select dbinfo('sqlca.sqlerrd1') from systables where tabid=1 ;
Regards,
Shriyan
A similar kind of data type is available, called SERIAL. You may specify the initial starting number as starting seed number (default 1) One need to pass a fixed value 0 for the serial type columns; so that the database server can generate to next sequence number in ascending order. If you insert any other number, it will be accepted as it is & will be stored in the table. If you need to maintain a unique sequence of numbers; you should implement an unique index on the column.
Example:
create temp table tab1 (f1 serial) with no log ;
insert into tab1 values (0) ;
-- show the generated sequence number.
select dbinfo('sqlca.sqlerrd1') from systables where tabid=1 ;
Regards,
Shriyan