Name

SET-SEQUENCE-POSITION — Sets the position of a database sequence.Function

Syntax

      set-sequence-position name position &key database => result

Arguments and Values

name

The name of the sequence as a string, symbol or SQL expression.

position

An integer.

database

A database object which defaults to *default-database*.

result

An integer.

Description

Explicitly set the position of the sequence called name in database, which defaults to *default-database*, to position which is returned.

Examples

(sequence-last [foo])
=> 4
(set-sequence-position [foo] 50)
=> 50
(sequence-next [foo])
=> 51
      

Side Effects

Modifies the value of the sequence name in database.

Affected by

*default-database*

Exceptional Situations

Will signal an error of type sql-database-data-error if a sequence called name does not exist in database.

See Also

create-sequence
drop-sequence
list-sequences
sequence-exists-p
sequence-last
sequence-next

Notes

set-sequence-position is a CLSQL extension.