Tuesday, February 21, 2012

Truncate SQL Command and AutoNumber


Note for myself...

TRUNCATE TABLE (Transact-SQL)
SQL Server 2008 R2

If a table contains an identity column, the counter for that column is RESET to the seed value defined for the column. If no seed was defined, the default value 1 is used. To retain the identity counter (AutoNumber), use DELETE instead of TRUNCATE.
Post a Comment