SQL Azure - copy table between databases

后端 未结 12 2380
天命终不由人
天命终不由人 2020-12-08 13:39

I am trying to run following SQL:

INSERT INTO Suppliers ( [SupplierID], [CompanyName]) 
Select  [SupplierID], [CompanyName] From [AlexDB]..Suppliers
<         


        
12条回答
  •  一个人的身影
    2020-12-08 14:18

    SQL-Azure does not support USE statement and effectively no cross-db queries. So the above query is bound to fail.

    If you want to copy/backup the db to another sql azure db you can use the "Same-server" copying or "Cross-Server" copying in SQL-Azure. Refer this msdn article

提交回复
热议问题