[英]How to copy one table data to another one between two Azure databases on the same server
I want to copy data from one database table into another database table on the same server in Azure SQL. I have done all of the Azure SQL Cross Database Query' steps that are written here https://www.mssqltips.com/sqlservertip/6445/azure-sql-cross-database-query/but still get the same error whenever I execute a query 'Reference to database and/or server name in 'db name' is not supported in this version of SQL Server.'我想将数据从一个数据库表复制到 Azure SQL 中同一服务器上的另一个数据库表中。我已经完成了所有 Azure SQL 跨数据库查询步骤,这些步骤写在这里https://www.mssqltips.com/sqlservertips/ 6445/azure-sql-cross-database-query/但每当我执行查询“此版本的 SQL 服务器不支持对数据库名称和/或服务器名称的引用”时,仍然出现相同的错误。
Can you pls help to figure out this?你能帮忙弄清楚这个吗?
Azure SQL database doesn't support across query directly. Azure SQL 数据库不支持直接跨查询。
We can not use USE
statements and it not supported.我们不能使用
USE
语句,它不受支持。 That's why you get the error.这就是你得到错误的原因。 We can not run statements like
select * from [other_database].[schema].[table]
.我们不能运行像
select * from [other_database].[schema].[table]
这样的语句。
In Azure SQL database, only elastic query overview (preview) can achieve cross database query:在Azure SQL数据库中,只有elastic query overview(preview)可以实现跨库查询:
You could follow the tutorial and it may be more complex than on-premise SQL Server: Get started with cross-database queries (vertical partitioning) (preview)您可以按照教程进行操作,它可能比内部部署更复杂 SQL 服务器: 跨数据库查询入门(垂直分区)(预览)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.