我想用一栏编制表格:
IdRole
IdProcedure
想法是<代码> IdProcedure is a FK to sys.objects
.
当我问:
SELECT *
FROM sys.objects
WHERE type= p
劳动报酬:
ALTER TABLE dbo.CORE_ProcedureXRole
ADD CONSTRAINT FK_SysProcedure
FOREIGN KEY (IdProcedure)
REFERENCES sys.objects(object_id)
告诉我:
Foreign key FK_SysProcedure references invalid table sys.objects .