【发布时间】:2015-07-07 23:22:25
【问题描述】:
首先,我是 T-SQL 的初学者,所以这个问题可能很愚蠢。对于那个很抱歉。
我正在尝试像这样将表复制到另一个数据库
USE Datatable
GO
SELECT *
INTO Datatable.HumanResources.Employee
FROM AdventureWorks2012.HumanResources.Employee
WHERE 1=0
我得到一个错误:
"Msg 2760, Level 16, State 1, Line 2
The specified schema name "HumanResources" either does not exist or
you do not have permission to use it."
我是否有权限,或者我不能像那样重用 Adventureworks 架构或以某种方式更改权限?帮助。
【问题讨论】:
-
我相信错误消息是指 Datatable 架构。如果您尝试使用 datatable.dbo.employee 做同样的事情,它会起作用吗?
-
我试过了,但它并没有准确地复制所有表,因为它们有自己的架构。