Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add records from one table to another
Message
De
06/07/2017 22:34:45
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01652499
Message ID:
01652533
Vues:
39
>>>BTW, the correct syntax for above INSERT will be:
>>>
>>>insert into Ten_name (ten_pk, user_id, user_pwrd)
>>>select ten_pk, user_id, user_pwrd from Tenant x
>>
>>Will that work if the primary key is an auto-increment integer?
>
>What is the goal? Insert exactly same PK or let the PK autogenerate?
>
>In the latter case you need to remove PK column from the INSERT command fields.
>
>In the former case see SET INDENTITY INSERT command.
OK
Thanks, Naomi
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform