Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add records from one table to another
Message
From
06/07/2017 22:34:45
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01652499
Message ID:
01652533
Views:
38
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform