• lsrep17 Documentation
  • Tables [HumanResources].[Department]
    Lookup table containing the departments within the Adventure Works Cycles company.
    PropertyValue
    CollationSQL_Latin1_General_CP1_CI_AS
    Row Count (~)16
    Created13:14:19 14 marca 2012
    Last Modified13:14:54 14 marca 2012
    KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
    Cluster Primary Key PK_Department_DepartmentID: DepartmentIDDepartmentIDsmallint2
    False
    1 - 1Primary key for Department records.
    Indexes AK_Department_NameName[dbo].[Name]100
    False
    Name of the department.
    GroupName[dbo].[Name]100
    False
    Name of the group to which the department belongs.
    ModifiedDatedatetime8
    False
    (getdate())Date and time the record was last updated.
    KeyNameKey ColumnsUniqueDescription
    Cluster Primary Key PK_Department_DepartmentID: DepartmentIDPK_Department_DepartmentIDDepartmentID
    True
    Primary key (clustered) constraint
    AK_Department_NameName
    True
    Unique nonclustered index.
    CREATE TABLE [HumanResources].[Department]
    (
    [DepartmentID] [smallint] NOT NULL IDENTITY(1, 1),
    [Name] [dbo].[Name] NOT NULL,
    [GroupName] [dbo].[Name] NOT NULL,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Department_ModifiedDate] DEFAULT (getdate())
    ) ON [PRIMARY]
    GO
    ALTER TABLE [HumanResources].[Department] ADD CONSTRAINT [PK_Department_DepartmentID] PRIMARY KEY CLUSTERED  ([DepartmentID]) ON [PRIMARY]
    GO
    CREATE UNIQUE NONCLUSTERED INDEX [AK_Department_Name] ON [HumanResources].[Department] ([Name]) ON [PRIMARY]
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Lookup table containing the departments within the Adventure Works Cycles company.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', NULL, NULL
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key for Department records.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'COLUMN', N'DepartmentID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Name of the group to which the department belongs.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'COLUMN', N'GroupName'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'COLUMN', N'ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Name of the department.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'COLUMN', N'Name'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'CONSTRAINT', N'DF_Department_ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'CONSTRAINT', N'PK_Department_DepartmentID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'INDEX', N'AK_Department_Name'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'HumanResources', 'TABLE', N'Department', 'INDEX', N'PK_Department_DepartmentID'
    GO