我尝试使用其他表输入 INSERT INTO,但我有错误日志:
Mensagem 40515, Nível 15, Estado 1, Linha 18
Reference to database and/or server name in 'deletadosYY.dbo.deletadosCadastroTeste' is not supported in this version of SQL Server
我有可能这样做,因为我使用 azure 服务器,并且我需要在表之间更改信息。
我的 SQL 代码:
INSERT INTO deletadosYY.dbo.deletadosCadastroTeste VALUES (19,'Michael', 'Street Los Angelos', 25, '1998-12-25')
最佳答案
Azure SQL 数据库不支持 3+ 部分命名;它们是包含数据库,这意味着不允许引用数据库。
省略数据库名称并连接到连接字符串中的正确数据库(或者如果您位于 SSMS/ADS/等中,则切换数据库上下文)。那么你的陈述就很简单:
INSERT INTO dbo.deletadosCadastroTeste ({Your Column List goes here})
VALUES (19,'Michael', 'Street Los Angelos', 25, '1998-12-25');
关于sql-server - 使用 Azure SQL Server 在其他表中插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72659506/