开发者

sql insert PROBLEM

开发者 https://www.devze.com 2023-02-15 12:44 出处:网络
I want to get data from one table and transfer it to another like-for-like table on another pc. Is there a sql command where i can do an \"insert into table.....\"

I want to get data from one table and transfer it to another like-for-like table on another pc.

Is there a sql command where i can do an "insert into table....." ( but knowing the current values)

Better explaination:

Imagine you have 2 PC's. Both on separate servers. I want to u开发者_如何学JAVApdate the information from a table in PC 1 into PC 2. How?


It sounds like you're looking for

INSERT INTO SomeTable(A, B, C)
SELECT A, B, C FROM OtherTable

EDIT: Many database servers allow you to connect to a different server and use its data.
Your question cannot be answered without more detail.

In SQL Server, you can set up a linked server, then write SELECT A, B, C FROM Server2.Database.Schema.OtherTable.

0

精彩评论

暂无评论...
验证码 换一张
取 消