Transfer data from one database to another database

后端 未结 9 1887
眼角桃花
眼角桃花 2020-11-28 20:59

How to fetch the data from one database and insert in to another database table? I can\'t to do this. Please help me in transferring data from one to another.

9条回答
  •  误落风尘
    2020-11-28 21:37

    if both databases are on same server and you want to transfer entire table (make copy of it) then use simple select into statement ...

    select * into anotherDatabase..copyOfTable from oneDatabase..tableName
    

    You can then write cursor top of sysobjects and copy entire set of tables that way.

    If you want more complex data extraction & transformation, then use SSIS and build appropriate ETL in it.

提交回复
热议问题