• lsrep17 Documentation
  • Tables [HumanResources].[EmployeePayHistory]
    Employee pay history.
    PropertyValue
    Row Count (~)316
    Created13:14:19 14 marca 2012
    Last Modified15:26:58 22 marca 2017
    KeyNameData TypeMax Length (Bytes)Allow NullsDefaultDescription
    Cluster Primary Key PK_EmployeePayHistory_BusinessEntityID_RateChangeDate: BusinessEntityID\RateChangeDateForeign Keys FK_EmployeePayHistory_Employee_BusinessEntityID: [HumanResources].[Employee].BusinessEntityIDBusinessEntityIDint4
    False
    Employee identification number. Foreign key to Employee.BusinessEntityID.
    Cluster Primary Key PK_EmployeePayHistory_BusinessEntityID_RateChangeDate: BusinessEntityID\RateChangeDateRateChangeDatedatetime8
    False
    Date the change in pay is effective
    Check Constraints CK_EmployeePayHistory_Rate : ([Rate]>=(6.50) AND [Rate]<=(200.00))Ratemoney8
    False
    Salary hourly rate.
    Check Constraints CK_EmployeePayHistory_PayFrequency : ([PayFrequency]=(2) OR [PayFrequency]=(1))PayFrequencytinyint1
    False
    1 = Salary received monthly, 2 = Salary received biweekly
    ModifiedDatedatetime8
    False
    (getdate())Date and time the record was last updated.
    KeyNameKey ColumnsUniqueDescription
    Cluster Primary Key PK_EmployeePayHistory_BusinessEntityID_RateChangeDate: BusinessEntityID\RateChangeDatePK_EmployeePayHistory_BusinessEntityID_RateChangeDateBusinessEntityID, RateChangeDate
    True
    Primary key (clustered) constraint
    NameOn ColumnConstraintDescription
    CK_EmployeePayHistory_PayFrequencyPayFrequency([PayFrequency]=(2) OR [PayFrequency]=(1))Check constraint [PayFrequency]=(3) OR [PayFrequency]=(2) OR [PayFrequency]=(1)
    CK_EmployeePayHistory_RateRate([Rate]>=(6.50) AND [Rate]<=(200.00))Check constraint [Rate] >= (6.50) AND [Rate] <= (200.00)
    NameColumnsDescription
    FK_EmployeePayHistory_Employee_BusinessEntityIDBusinessEntityID->[HumanResources].[Employee].[BusinessEntityID]Foreign key constraint referencing Employee.EmployeeID.
    CREATE TABLE [HumanResources].[EmployeePayHistory]
    (
    [BusinessEntityID] [int] NOT NULL,
    [RateChangeDate] [datetime] NOT NULL,
    [Rate] [money] NOT NULL,
    [PayFrequency] [tinyint] NOT NULL,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_EmployeePayHistory_ModifiedDate] DEFAULT (getdate())
    ) ON [PRIMARY]
    GO
    ALTER TABLE [HumanResources].[EmployeePayHistory] ADD CONSTRAINT [CK_EmployeePayHistory_PayFrequency] CHECK (([PayFrequency]=(2) OR [PayFrequency]=(1)))
    GO
    ALTER TABLE [HumanResources].[EmployeePayHistory] ADD CONSTRAINT [CK_EmployeePayHistory_Rate] CHECK (([Rate]>=(6.50) AND [Rate]<=(200.00)))
    GO
    ALTER TABLE [HumanResources].[EmployeePayHistory] ADD CONSTRAINT [PK_EmployeePayHistory_BusinessEntityID_RateChangeDate] PRIMARY KEY CLUSTERED  ([BusinessEntityID], [RateChangeDate]) ON [PRIMARY]
    GO
    ALTER TABLE [HumanResources].[EmployeePayHistory] ADD CONSTRAINT [FK_EmployeePayHistory_Employee_BusinessEntityID] FOREIGN KEY ([BusinessEntityID]) REFERENCES [HumanResources].[Employee] ([BusinessEntityID])
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Employee pay history.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', NULL, NULL
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Employee identification number. Foreign key to Employee.BusinessEntityID.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'COLUMN', N'BusinessEntityID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'COLUMN', N'ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'1 = Salary received monthly, 2 = Salary received biweekly', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'COLUMN', N'PayFrequency'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Salary hourly rate.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'COLUMN', N'Rate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Date the change in pay is effective', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'COLUMN', N'RateChangeDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Check constraint [PayFrequency]=(3) OR [PayFrequency]=(2) OR [PayFrequency]=(1)', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'CONSTRAINT', N'CK_EmployeePayHistory_PayFrequency'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Check constraint [Rate] >= (6.50) AND [Rate] <= (200.00)', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'CONSTRAINT', N'CK_EmployeePayHistory_Rate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'CONSTRAINT', N'DF_EmployeePayHistory_ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Employee.EmployeeID.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'CONSTRAINT', N'FK_EmployeePayHistory_Employee_BusinessEntityID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'CONSTRAINT', N'PK_EmployeePayHistory_BusinessEntityID_RateChangeDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'HumanResources', 'TABLE', N'EmployeePayHistory', 'INDEX', N'PK_EmployeePayHistory_BusinessEntityID_RateChangeDate'
    GO