As I knew that there is no such thing for the serial.current.
There is three ways I have been using.
1. Stupid way, find the max(idx) from the table to get the next serial number because serial value is not an updated value.
2. from the SQLCA.SQLERRD, you can find the next serial number
3. use the SQL command to alter the starting value:
alter table temp modify idx serial (100);
Originally posted by mchih
is there a way to extract the current serial value?
The reason i want to extract the current serial value is that I have a trigger set up to use the current index value and store it to another table, which also has the serial datatype as primary key, as foreign key. I am researching a way to quickly find out the current serial value of the both tables, so I can find the latest inserted records and update them right away.
it seems max(idx)+1 would be the easiest way at the moment