Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sa_report_deadlocks system procedure Next Page

sa_reset_identity system procedure


Allows the next identity value to be set for a table. Use this to change the autoincrement value for the next row that will be inserted.

Syntax

sa_reset_identity(
tbl_name,
owner_name,
new_identity
)

Arguments
Remarks

The next identity value generated for a row inserted into the table is new_identity + 1.

No checking occurs to see whether new_identity + 1 conflicts with existing rows in the table. For example, if you specify new_identity as 100, the next row inserted gets an identity value of 101. However, if 101 already exists in the table, the row insertion fails.

If owner is not specified or is NULL, tbl_name must uniquely identify a table in the database.

Permissions

DBA authority required

Side effects

Causes a checkpoint to occur after the value has been updated

Example

The following statement resets the next identity value to 101:

CALL sa_reset_identity( 'Employees', 'DBA', 100 );