|
Home > Archive > Microsoft SQL Server forum > February 2006 > copy a table
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Marcin Zmyslowski 2006-02-25, 9:45 am |
| Hello all!
How to copy a table in MS SQL Server 2000 without chaning a structure? I
mean, I have one table, which has autoincrement numeric field (ID). When
I copy this table by exporting this table into the same database folder
I loose the specification of the field ID. Now it is not autoincrement
field but usual int field. Is it possible to copy this table without
changing data and structure of a table?
Kindest regards
Thank you
Marcin from Poland
*** Sent via Developersdex http://www.droptable.com ***
| |
| Robert Klemme 2006-02-25, 9:45 am |
| Marcin Zmyslowski wrote:
> Hello all!
>
> How to copy a table in MS SQL Server 2000 without chaning a
> structure? I mean, I have one table, which has autoincrement numeric
> field (ID). When I copy this table by exporting this table into the
> same database folder I loose the specification of the field ID. Now
> it is not autoincrement field but usual int field. Is it possible to
> copy this table without changing data and structure of a table?
With DTS copy object might do the trick. Otherwise, create DDL with QA or
EM, create the new table and then copy the data with "SET IDENTITY_INSERT
your_table ON". HTH
robert
| |
| Madhivanan 2006-02-25, 9:45 am |
|
Insert into table1(columns)
select columns from othertable
Madhivanan
|
|
|
|
|