# Table: Department

## Properties

Property | Value
--- | ---
Name | Department
ID | 757577737
Owner | dbo
Schema | HumanResources
Filegroup | PRIMARY
Data Size (KB) | 8 KB
Index Size (KB) | 24 KB
Rows | 16
Unused (KB) | 0 KB
ANSI Null On |
Quoted Identifier |
Lock Escalation | TABLE
Lock On Bulk Load |
Lob Data Space |
Filestream Data Space ID |
Has Unchecked Assembly Data |
Text In Row Limit (bytes) | Option not set
Large Value Types Out Of Row |
FullText Change Tracking On |
Tracked By Cdc |
Published |
Schema Published |
Replicated |
Replication Filter |
Merge Published |
Sync Tran Subscribed |
MS Shipped |
Modify Date | 8/8/2010 5:23:39 PM
Create Date | 8/8/2010 5:21:47 PM

## Extended Properties

Name | Value
--- | ---
MS_Description | Lookup table containing the departments within the Adventure Works Cycles company.

## Columns

Column ID | Column Name | Datatype | Nullable | Is Sparse | Is Column Set
--- | --- | --- | --- | --- | ---
1 | DepartmentID | smallint |  |  |
2 | Name | Name |  |  |
3 | GroupName | Name |  |  |
4 | ModifiedDate | datetime |  |  |

## Identity Columns

Column | Seed Value | Increment Value | Last Value | Is Not For Replication | Is Computed | Is Sparse | Is Column Set
--- | --- | --- | --- | --- | --- | --- | ---
DepartmentID | 1 | 1 | 16 |  |  |  |

## Primary Key Constraints

Name | Is System Named | Extended Property Name | Extended Property Value
--- | --- | --- | ---
PK_Department_DepartmentID |  | MS_Description | Primary key (clustered) constraint

## Primary Key Columns

Name
DepartmentID

## Foreign Keys

No foreign keys defined.

## Column Level Check Constraints

No column constraints defined.

## Table Level Check Constraints

No table constraints defined.

## Default Constraints

Name | Column | Definition | Is System Named | Extended Property Name | Extended Property Value
--- | --- | --- | --- | --- | ---
DF_Department_ModifiedDate | ModifiedDate | (getdate()) |  | MS_Description | Default constraint value of GETDATE()

## Indexes

Name | Index Type | Primary Key | Unique | Unique Constraint | Ignore Duplicate Key | Disabled
--- | --- | --- | --- | --- | --- | ---
PK_Department_DepartmentID | CLUSTERED |  |  |  |  |
AK_Department_Name | NONCLUSTERED |  |  |  |  |

## FullText Indexes

No fulltext indexes defined.

## Referencing Tables

Name | Key Index ID | Is Disabled | Is Not For Replication | Is Not Trusted | Delete Action | Update Action | Is System Named | Referencing Object
--- | --- | --- | --- | --- | --- | --- | --- | ---
FK_EmployeeDepartmentHistory_Department_DepartmentID | 1 |  |  |  | No action | No action |  | HumanResources.EmployeeDepartmentHistory

## Object Level Permissions

#### Permissions for: weekly_receipts

Permission | Grantor | Grant | With Grant Option | Deny
--- | --- | --- | --- | ---
Alter |  |  |  |
Control |  |  |  |
Delete |  |  |  |
Insert |  |  |  |
References |  |  |  |
Select | dbo |  |  |
Take Ownership |  |  |  |
Update | dbo |  |  |
View Change Tracking |  |  |  |
View Definition |  |  |  |

## Column Level Permissions

No explicit column permissions granted to this object

## Statistics

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
PK_Department_DepartmentID | Aug 8 2010 5:22PM | 16 | 16 | 9 | 1 | 2 |  |  | 16

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.0625 | 2 | DepartmentID

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
1 | 0 | 1 | 0 | 1
3 | 1 | 1 | 1 | 1
5 | 1 | 1 | 1 | 1
7 | 1 | 1 | 1 | 1
9 | 1 | 1 | 1 | 1
11 | 1 | 1 | 1 | 1
13 | 1 | 1 | 1 | 1
15 | 1 | 1 | 1 | 1
16 | 0 | 1 | 0 | 1

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
AK_Department_Name | Aug 8 2010 5:23PM | 16 | 16 | 16 | 0 | 30.75 |  |  | 16

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.0625 | 28.75 | Name
0.0625 | 30.75 | Name, DepartmentID

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
Document Control | 0 | 1 | 0 | 1
Engineering | 0 | 1 | 0 | 1
Executive | 0 | 1 | 0 | 1
Facilities and Maintenance | 0 | 1 | 0 | 1
Finance | 0 | 1 | 0 | 1
Human Resources | 0 | 1 | 0 | 1
Information Services | 0 | 1 | 0 | 1
Marketing | 0 | 1 | 0 | 1
Production | 0 | 1 | 0 | 1
Production Control | 0 | 1 | 0 | 1
Purchasing | 0 | 1 | 0 | 1
Quality Assurance | 0 | 1 | 0 | 1
Research and Development | 0 | 1 | 0 | 1
Sales | 0 | 1 | 0 | 1
Shipping and Receiving | 0 | 1 | 0 | 1
Tool Design | 0 | 1 | 0 | 1

## Objects that depend on [Department]

- HumanResources.Department
  - HumanResources.EmployeeDepartmentHistory
    - HumanResources.vEmployeeDepartment
    - HumanResources.vEmployeeDepartmentHistory

## Objects on which [Department] depends

- HumanResources.Department
  - dbo.Name

## SQL

Script
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [HumanResources].[Department]( [DepartmentID] [smallint] IDENTITY(1,1) NOT NULL, [Name] [dbo].[Name] NOT NULL, [GroupName] [dbo].[Name] NOT NULL, [ModifiedDate] [datetime] NOT NULL ) ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key for Department records.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'TABLE',@level1name=N'Department', @level2type=N'COLUMN',@level2name=N'DepartmentID' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name of the department.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'TABLE',@level1name=N'Department', @level2type=N'COLUMN',@level2name=N'Name' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name of the group to which the department belongs.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'TABLE',@level1name=N'Department', @level2type=N'COLUMN',@level2name=N'GroupName' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time the record was last updated.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'TABLE',@level1name=N'Department', @level2type=N'COLUMN',@level2name=N'ModifiedDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Lookup table containing the departments within the Adventure Works Cycles company.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'TABLE',@level1name=N'Department'

#### See also

List of Tables