|
|
|
|
||||||
| ms.sqlserver.setup Questions about SQL Server. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
is it possible to make a duplicate of a table (with another name of course) with a command like 'copy' or 'duplicate' or ...? Thanks Chris |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
You can use SELECT INTO:
SELECT * INTO AnotherTable FROM MyTable However, this will not copy the constraints and indexes. -- Tom ---------------------------------------------------- Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS SQL Server MVP Toronto, ON Canada https://mvp.support.microsoft.com/profile/Tom.Moreau "Chris" <gddfd@er.df> wrote in message news:%23k6PN5V0HHA.3800@TK2MSFTNGP06.phx.gbl... Hi, is it possible to make a duplicate of a table (with another name of course) with a command like 'copy' or 'duplicate' or ...? Thanks Chris |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks
"Tom Moreau" <tom@dont.spam.me.cips.ca> schreef in bericht news:eBhNTdW0HHA.1204@TK2MSFTNGP03.phx.gbl... > You can use SELECT INTO: > > SELECT > * > INTO > AnotherTable > FROM > MyTable > > However, this will not copy the constraints and indexes. > > -- > Tom > > ---------------------------------------------------- > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS > SQL Server MVP > Toronto, ON Canada > https://mvp.support.microsoft.com/profile/Tom.Moreau > > > "Chris" <gddfd@er.df> wrote in message > news:%23k6PN5V0HHA.3800@TK2MSFTNGP06.phx.gbl... > Hi, > > is it possible to make a duplicate of a table (with another name of > course) > with a command like 'copy' or 'duplicate' or ...? > Thanks > Chris > > |
|
![]() |
| Outils de la discussion | |
|
|