Table: [AdventureWorks2016CTP3].[HumanResources].[Shift]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [HumanResources]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  366624349
 Located on  PRIMARY
 Data size KB  8 KB
 Index size KB  40 KB
 Rows  3
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_Shift_ShiftID]
 Filetable streamid unique   
 Filetable fullpath unique   
 Filetable is enabled   
 Is memory optimized   
 Durability  SCHEMA_AND_DATA

Collapse image Creation options


Name  Value 
QUOTED_IDENTIFIER ON
ANSI_NULLS ON
ANSI_PADDING ON

Collapse image Columns


    Name  Description  Data type  Max length  Nullable  Default IsGUID  SPARSE Computed value
Primary key Identity ShiftID     tinyint 1        
    Name     [dbo].[Name] 50        
    StartTime     time 5        
    EndTime     time 5        
    ModifiedDate     datetime 8   (getdate())    
Total: 5 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_Shift_ShiftID] ShiftID   48 0
[AK_Shift_Name] Name     16 0
[AK_Shift_StartTime_EndTime] StartTime     16 0
Total: 3 Index/indexes

Collapse image Columnstore indexes


No columnstore indexes exist

Collapse image Identity column


  Name  Seed  Increment  Not for replication 
 ShiftID   1   1   

Collapse image Referencing tables


Table  Foreign key  Primary key or unique constraint 
[HumanResources].[EmployeeDepartmentHistory] FK_EmployeeDepartmentHistory_Shift_ShiftID PK_Shift_ShiftID
Total: 1 table(s)

Collapse image Objects that depend on [HumanResources].[Shift]


Object name Object type Dep level
[HumanResources].[EmployeeDepartmentHistory] Table 1
[HumanResources].[vEmployeeDepartmentHistory] View 1
Total 2 object(s)

Collapse image Objects that [HumanResources].[Shift] depends on


Object name Object type Dep level
[HumanResources] Schema 1
[dbo].[Name] Datatype 1
Total 2 object(s)

Collapse image Extended properties


Name  Value 
MS_Description Work shift lookup table.

Collapse image Table options


Name  Value 
Pintable OFF
Table lock on bulk load OFF
Insert row lock OFF
Text in row 0
Large value types out of row OFF

Collapse image SQL


SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
CREATE TABLE [HumanResources].[Shift] (
        [ShiftID]          [tinyint] IDENTITY(1, 1) NOT NULL,
        [Name]             [dbo].[Name] NOT NULL,
        [StartTime]        [time](7) NOT NULL,
        [EndTime]          [time](7) NOT NULL,
        [ModifiedDate]     [datetime] NOT NULL,
        CONSTRAINT [PK_Shift_ShiftID]
        PRIMARY KEY
        CLUSTERED
        ([ShiftID])
    ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'CONSTRAINT', N'PK_Shift_ShiftID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'INDEX', N'PK_Shift_ShiftID'
GO
ALTER TABLE [HumanResources].[Shift]
    ADD
    CONSTRAINT [DF_Shift_ModifiedDate]
    DEFAULT (getdate()) FOR [ModifiedDate]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'CONSTRAINT', N'DF_Shift_ModifiedDate'
GO
CREATE UNIQUE NONCLUSTERED INDEX [AK_Shift_Name]
    ON [HumanResources].[Shift] ([Name])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'INDEX', N'AK_Shift_Name'
GO
CREATE UNIQUE NONCLUSTERED INDEX [AK_Shift_StartTime_EndTime]
    ON [HumanResources].[Shift] ([StartTime], [EndTime])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'INDEX', N'AK_Shift_StartTime_EndTime'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Shift end time.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'COLUMN', N'EndTime'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Shift description.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'COLUMN', N'Name'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key for Shift records.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'COLUMN', N'ShiftID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Shift start time.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', 'COLUMN', N'StartTime'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Work shift lookup table.', 'SCHEMA', N'HumanResources', 'TABLE', N'Shift', NULL, NULL
GO

Collapse image See also


List of tables