This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10816|Reply: 0

[Source] SQLServer imports data from one table to another

[Copy link]
Posted on 11/16/2019 2:43:29 PM | | |
SQLServer imports data from one table to another

Table B data is transferred to Table A

1. If Table A exists

insert into A(a,b,c) (select a,b,c from B)

2. If Form A does not exist

select a,b,c into A from B

If you need to cross databases, command:

select * into BackUpTempDb. [dbo].itsvse from MyDb. [dbo].test

3. If you need to cross databases

insert into library A. [dbo]. Table A(a,b,c) (select a,b,c from library B.[ dbo]. Table B)

The data of the W table of the P library is transferred to the W table of the C library

Example: insert into CbjGameProjectXBDB1_3. [dbo]. WeaponAmmo_EffectSet(a,b,c) (select a,b,c from ProjectOneGameInfo.[ dbo]. WeaponAmmo_EffectSet)




Previous:C# Prevent multiple logins from the same account (cache method)
Next:Docker upgrade to the latest version
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com