user532104
user532104

Reputation: 1423

sql insert PROBLEM

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 update the information from a table in PC 1 into PC 2. How?

Upvotes: 0

Views: 154

Answers (1)

SLaks
SLaks

Reputation: 887225

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.

Upvotes: 4

Related Questions