简体   繁体   中英

I want the identity seed of my PK start from 1

I will try to be short and explicit.

When I importing data to my DW from SSIS, the Primary Key of Dimension tables are not starting from 1. This is happening each time I run my SSIS - it deletes all the information from the tables and then reloads them. But why is the Primary key continuously incrementing?

I changed the definitions on SSMS by selecting the following:

**(Is identity)** "YES"
**Identity Increment** 1
**Identity seed** 1
**Not for replication** "YES"

After this change, whenI run the SSIS just continues with the previous numeration.

Can someone help with this?

Thank you in advance

Sounds like you need to issue a TRUNCATE TABLE rather than DELETE . Truncate will reinitialize your IDENTITY column

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM