Contents Index sa_procedure_profile_summary system procedure sa_server_option system procedure

ASA SQL Reference
  System Procedures and Functions
    System and catalog stored procedures

sa_reset_identity system procedure


Function 

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

Syntax 

sa_reset_identity ( [ table_name ], [ owner ], [ new_identity_value ] )

Permissions 

DBA authority required.

Side effects 

Causes a checkpoint to occur after the value has been updated.

Description 

The next value generated for a row inserted into the table will be new_identity_value + 1.

No checking occurs on the new_identity_value to ensure that it does not conflict with existing rows in the table. An invalid value could cause subsequent inserts to fail.

Parameters 

The procedure accepts three arguments:

table_name    identifies the table you want to set the identity value for.

owner    identifies the owner of the table you want to set the identity value for.

new_identity_value    identifies the number from which you want to start the value counting.

Example 

The following statement resets the identity value to 101:

CALL sa_reset_identity ('employee', 'dba', 100)

Contents Index sa_procedure_profile_summary system procedure sa_server_option system procedure