After select the table from one server and how to insert into another server?

后端 未结 2 1791
梦谈多话
梦谈多话 2021-01-20 12:14

I have two servers and I need to transfer all the details of a particular user from one server to another server.

I selected row from one server and now I have to in

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-20 12:28

    USE full qualified name like

            INSERT INTO  SERVER1.DATABASE1.dbo.TABLE1  values(SELECT * FROM SERVER2.DATABASE2.dbo.TABLE2)
      
    make sure that no. of columns and dataType should be same of those two tables and order of column value should be same .

提交回复
热议问题