PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.setup > how to make a duplicate of a table?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
ms.sqlserver.setup Questions about SQL Server.

how to make a duplicate of a table?

Réponse
 
LinkBack Outils de la discussion
Vieux 28/07/2007, 22h28   #1
Chris
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut how to make a duplicate of a table?

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


  Réponse avec citation
Vieux 28/07/2007, 23h33   #2
Tom Moreau
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how to make a duplicate of a table?

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


  Réponse avec citation
Vieux 30/07/2007, 23h09   #3
Mark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how to make a duplicate of a table?

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
>
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h42.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10081 seconds with 11 queries