I am importing a table from one database to another in SQL Server 2008 by right-clicking the target database and choosing > Tasks > Import Data...
When I import the table I get the column names and types and all the data fine, but I lose the primary key, identity specifications and all the default values that were set in the source table. So now I have to set all the default values for each column again manually. Is there any way to get the default values with the import, or even after with a Query?
I am VERY new to this and flailing in the dark, so forgive me if this is a really stupid question...
Try generating a create script for your source table and use that script to create your complete destination table structure. Then use the import data wizard to copy data from the source table into your newly created table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With