sp_iq_reset_identity Procedure

Sets the seed of the Identity/Autoincrement column associated with the specified table to the specified value.

Syntax

sp_iq_reset_identity (table_name, table_owner, value)

Parameters

You must specify table_name, table owner, and value.

Privileges

You must have EXECUTE privilege on the system procedure. You must also have one of the following:
  • ALTER ANY TABLE system privilege
  • ALTER ANY OBJECT system privilege
  • ALTER privilege on the table
  • You own the table

Remarks

The Identity/Autoincrement column stores a number that is automatically generated. The values generated are unique identifiers for incoming data. The values are sequential, are generated automatically, and are never reused, even when rows are deleted from the table. The seed value specified replaces the default seed value and persists across database shutdowns and failures.

Related reference
sp_iqcolumn Procedure
sp_iqconstraint Procedure
sp_iqdatatype Procedure
sp_iqevent Procedure
sp_iqhelp Procedure
sp_iqindex and sp_iqindex_alt Procedures
sp_iqpkeys Procedure
sp_iqprocparm Procedure
sp_iqtable Procedure
sp_iqview Procedure
Determining the Security Model Used by a Database