Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-create the table, but preserve the data
Message
 
 
À
03/06/2008 13:55:38
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01321355
Message ID:
01321371
Vues:
15
>>Hi everybody,
>>
>>I want to have a create table script which I can execute multiple times (so I would need to have drop statements first).
>>
>>I also would like to be able to preserve existing data.
>>
>>Is there a way to write such a script?
>>
>>Thanks a lot in advance.
>
>Isn't there something like a temp table in sqlserver ?

Found this in my PM
create table #test (Fld1 int)
SELECT OBJECT_ID('TempDb..#test'), OBJECT_ID('#test')
DROP TABLE #Test
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform