SQL Server Import table keeping default values
Posted
by Chrissi
on Stack Overflow
See other posts from Stack Overflow
or by Chrissi
Published on 2010-04-06T00:29:49Z
Indexed on
2010/04/06
0:33 UTC
Read the original article
Hit count: 284
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...
© Stack Overflow or respective owner