Exporting data with primary keys

  • Good day,

    I want to export data from one table to another using export and import wizard,i realised that the primary keys are not exported ,Is there a way to play around it  without scripting the table first.

    Thanks

  • tmmutsetse - Monday, February 19, 2018 6:51 AM

    Good day,

    I want to export data from one table to another using export and import wizard,i realised that the primary keys are not exported ,Is there a way to play around it  without scripting the table first.

    Thanks

    What about this ?

    https://www.sqlservercentral.com/Forums/Topic594018-149-1.aspx

  • tmmutsetse - Monday, February 19, 2018 6:51 AM

    Good day,

    I want to export data from one table to another using export and import wizard,i realised that the primary keys are not exported ,Is there a way to play around it  without scripting the table first.

    Thanks

    Why do you not want to script the table?  If you don't, though, then just script the primary key constraint. Expand the table, expand Keys, right-click on the primary key constraint and choose Script Key as -> CREATE To -> Clipboard.

    John

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply