question

Ramya19 avatar image
Ramya19 asked

Row number

we have a rownumber to a specific column and if i have done truncate to the table and again inserting records will it continue the sequence or it will start from 0 again.

truncaterownumber
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered

If you mean you use the IDENTITY property of a column to generate unique IDs, then yes after a TRUNCATE the identity counter will be reset to the seed value that is defined on the column. If no seed was defined, then it will start at 1.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.