1

我突然收到以下错误:

FK_dbo.TimeHoursWorked_dbo.Employee_EmployeeId' 不是约束。无法删除约束。查看以前的错误

我不明白,因为没有称为dbo.TimeHoursWorked或的表dbo.Employee(我确实有表TimeHoursWorkedEmployee.

4

1 回答 1

1

You do actually have tables called

dbo.TimeHoursWorked and dbo.Employee..

dbo stands for Database Owner, and each table that does not have an owner specified, gets assigned to dbo.

A fully qualified SQL table is

<databaseName>.<owner>.<tableName>

You can use SELECT * FROM Employee which assumes the current database or you can use SELECT * FROM Payroll.dbo.Employee which looks in the Payroll database for a table called Employee owned by the database owner

于 2013-09-04T23:02:46.857 回答