Relationship: FK_EmployeeDepartmentHistory_Department_DepartmentID on EmployeeDepartmentHistory

CollapseAll image

Collapse image Relationship properties


 Name   Value 
 Not For Replication   

Collapse image FK columns


EmployeeDepartmentHistory column Department column Type
DepartmentID DepartmentID smallint

Collapse image Extended properties


Name  Value 
MS_Description Foreign key constraint referencing Department.DepartmentID.
/ -->

Collapse image SQL


ALTER TABLE [HumanResources].[EmployeeDepartmentHistory]
    WITH CHECK
    ADD CONSTRAINT [FK_EmployeeDepartmentHistory_Department_DepartmentID]
    FOREIGN KEY ([DepartmentID]) REFERENCES [HumanResources].[Department] ([DepartmentID])
ALTER TABLE [HumanResources].[EmployeeDepartmentHistory]
    CHECK CONSTRAINT [FK_EmployeeDepartmentHistory_Department_DepartmentID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Department.DepartmentID.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeeDepartmentHistory', 'CONSTRAINT', N'FK_EmployeeDepartmentHistory_Department_DepartmentID'
GO

Collapse image See also


[HumanResources].[EmployeeDepartmentHistory]

[HumanResources].[Department]