I think you should. But "need"? I have no idea of the context where this is happening. But if you don't create a PK, and you copy some rows twice, you will have a mess to sort out.
Source table has primary key and should I need to create in destination table
Hi,
I am loading the data from source table to destination table where primary key exists on the source table. My question is do I need to create the primary key in destination table as well?
Thanks!
2 answers
Sort by: Most helpful
-
-
MelissaMa-MSFT 24,196 Reputation points
2020-08-26T01:56:47.657+00:00 Hi @red ,
I found more details about your reqirement in another forum.
I need to create a incremental load from source to destination table for reporting needs. We dont have leverage to access source table for all our needs. To be precise I will jst inserting the new records thats comes into source table on daily basis and load into destination table only respective one day records – red 7 hours ago
Since you would like to create a incremental load from source to destination table, it is strongly recommended for you to create primary key in destination table as well so that both source and destination tables could have the same schema.
Besides, you could also consider to use SSIS to perform Incremental Load because it could compare the destination table against the source data based on Id or Date Stamp or Time Stamp.
Please refer more details in below link:
Incremental Load in SSISIf the response is helpful, please click "Accept Answer" and upvote it.
Best regards
Melissa