Sequence Support in the SQL Layer

New Functions

A partial implementation of the sequence API defined in the SQL 2003 specification has been added to the SQL layer. A sequence is created using the syntax:

SELECT create_sequence("sequence_name"...) 

The sequence numbers are accessed using

SELECT nextval("sequence_name") 

and

SELECT currval("sequence_name")

Finally, a sequence can be dropped using

SELECT drop_sequence("sequence_name")

New Functions

The four new functions, which have to be called as part of a SELECT statement, are describe in more detail in Using Sequences in the Berkeley DB Getting Started with the SQL APIs guide.