Obtains the last number of serial8, used in a table.

1 sqlca.serial8

<sqlca.serial8 />
Example

Recuperation of serial8 after a simple operation of INSERT.

Also, you can consult the examples of the function serial because it offers the same possibilities but with data of different type, because the serial8 allows to store 64bits for the 36bits of the serial.

Copy
<table name='pru_serial8_1' >
    <column name='apteid' type='serial8' required='y' />
    <column name='nom'    type='char' size='100' required='y' />
</table>
<insert table='pru_serial8_1'>
    <column name='apteid'>2</column>
    <column name='nom'>nombre1</column>
</insert>
<set name='con_serial8_id'><sqlca.serial8 /></set>

It is stored in the variable called con_serial8_id, the serial8 value of the last register inserted in the table pru_serial8_1. You can recover it in the same way that in the Serial case, explained in the previous section.