Editing HumanResources.Employee (table)
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
− | |- | + | |- |
| '''Table | | '''Table | ||
| HumanResources.Employee | | HumanResources.Employee | ||
− | |- | + | |- |
− | |||
− | |||
|} | |} | ||
− | + | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 17: | Line 15: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | ''' | + | | '''PK |
− | + | | '''Index | |
− | |- | + | |
+ | |- | ||
| EmployeeID | | EmployeeID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | PK_Employee_EmployeeID |
− | |- | + | | |
+ | |- | ||
| NationalIDNumber | | NationalIDNumber | ||
| nvarchar(15) | | nvarchar(15) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | AK_Employee_NationalIDNumber |
+ | |- | ||
| ContactID | | ContactID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| LoginID | | LoginID | ||
| nvarchar(256) | | nvarchar(256) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | AK_Employee_LoginID |
+ | |- | ||
| ManagerID | | ManagerID | ||
| int | | int | ||
| null | | null | ||
| | | | ||
− | | | + | | |
− | |- | + | | IX_Employee_ManagerID |
+ | |- | ||
| Title | | Title | ||
| nvarchar(50) | | nvarchar(50) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| BirthDate | | BirthDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| MaritalStatus | | MaritalStatus | ||
| nchar(1) | | nchar(1) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| Gender | | Gender | ||
| nchar(1) | | nchar(1) | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| HireDate | | HireDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| SalariedFlag | | SalariedFlag | ||
| dbo.Flag | | dbo.Flag | ||
| not null | | not null | ||
| ((1)) | | ((1)) | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| VacationHours | | VacationHours | ||
| smallint | | smallint | ||
| not null | | not null | ||
| ((0)) | | ((0)) | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| SickLeaveHours | | SickLeaveHours | ||
| smallint | | smallint | ||
| not null | | not null | ||
| ((0)) | | ((0)) | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| CurrentFlag | | CurrentFlag | ||
| dbo.Flag | | dbo.Flag | ||
| not null | | not null | ||
| ((1)) | | ((1)) | ||
− | | | + | | |
− | |- | + | | |
+ | |- | ||
| rowguid | | rowguid | ||
| uniqueidentifier | | uniqueidentifier | ||
| not null | | not null | ||
| (newid()) | | (newid()) | ||
− | | | + | | |
− | |- | + | | AK_Employee_rowguid |
+ | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (getdate()) | | (getdate()) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| | | | ||
− | | | + | | |
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 191: | Line 139: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
− | + | ||
− | |- | + | |- |
| [[Person.Contact_(table)|Person.Contact]] | | [[Person.Contact_(table)|Person.Contact]] | ||
| ContactID | | ContactID | ||
| ContactID | | ContactID | ||
− | |- | + | |- |
| [[HumanResources.Employee_(table)|HumanResources.Employee]] | | [[HumanResources.Employee_(table)|HumanResources.Employee]] | ||
| ManagerID | | ManagerID | ||
Line 202: | Line 150: | ||
|} | |} | ||
− | + | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 208: | Line 156: | ||
| '''Column | | '''Column | ||
| '''Referencing Column | | '''Referencing Column | ||
− | + | ||
− | |- | + | |- |
| [[HumanResources.Employee_(table)|HumanResources.Employee]] | | [[HumanResources.Employee_(table)|HumanResources.Employee]] | ||
| EmployeeID | | EmployeeID | ||
| ManagerID | | ManagerID | ||
− | |- | + | |- |
| [[HumanResources.EmployeeAddress_(table)|HumanResources.EmployeeAddress]] | | [[HumanResources.EmployeeAddress_(table)|HumanResources.EmployeeAddress]] | ||
| EmployeeID | | EmployeeID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- |
| [[HumanResources.EmployeeDepartmentHistory_(table)|HumanResources.EmployeeDepartmentHistory]] | | [[HumanResources.EmployeeDepartmentHistory_(table)|HumanResources.EmployeeDepartmentHistory]] | ||
| EmployeeID | | EmployeeID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- |
| [[HumanResources.EmployeePayHistory_(table)|HumanResources.EmployeePayHistory]] | | [[HumanResources.EmployeePayHistory_(table)|HumanResources.EmployeePayHistory]] | ||
| EmployeeID | | EmployeeID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- |
| [[HumanResources.JobCandidate_(table)|HumanResources.JobCandidate]] | | [[HumanResources.JobCandidate_(table)|HumanResources.JobCandidate]] | ||
| EmployeeID | | EmployeeID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- |
| [[Purchasing.PurchaseOrderHeader_(table)|Purchasing.PurchaseOrderHeader]] | | [[Purchasing.PurchaseOrderHeader_(table)|Purchasing.PurchaseOrderHeader]] | ||
| EmployeeID | | EmployeeID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- |
| [[Sales.SalesPerson_(table)|Sales.SalesPerson]] | | [[Sales.SalesPerson_(table)|Sales.SalesPerson]] | ||
| EmployeeID | | EmployeeID | ||
Line 239: | Line 187: | ||
|} | |} | ||
− | + | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
− | | ''' | + | | '''Triggers |
| '''Type | | '''Type | ||
− | + | ||
− | |- | + | |- |
| dEmployee | | dEmployee | ||
| INSTEAD OF DELETE | | INSTEAD OF DELETE | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== automatically generated == | == automatically generated == | ||
Line 368: | Line 204: | ||
| '''Table | | '''Table | ||
| HumanResources.Employee | | HumanResources.Employee | ||
− | |- | + | |- |
+ | |||
| '''Description | | '''Description | ||
| Employee information such as salary, department, and title. | | Employee information such as salary, department, and title. | ||
|- | |- | ||
+ | |||
|} | |} | ||
Line 381: | Line 219: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | '''Description | + | | '''Description |
+ | | '''PK / Index | ||
− | |- | + | |- |
| EmployeeID | | EmployeeID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | Primary key for Employee records. | + | | Primary key for Employee records. |
− | |- | + | | PK_Employee_EmployeeID |
+ | |- | ||
| NationalIDNumber | | NationalIDNumber | ||
| nvarchar(15) | | nvarchar(15) | ||
| not null | | not null | ||
| | | | ||
− | | Unique national identification number such as a social security number. | + | | Unique national identification number such as a social security number. |
− | |- | + | | AK_Employee_NationalIDNumber |
+ | |- | ||
| ContactID | | ContactID | ||
| int | | int | ||
| not null | | not null | ||
| | | | ||
− | | Identifies the employee in the Contact table. Foreign key to Contact.ContactID. | + | | Identifies the employee in the Contact table. Foreign key to Contact.ContactID. |
− | |- | + | | |
+ | |- | ||
| LoginID | | LoginID | ||
| nvarchar(256) | | nvarchar(256) | ||
| not null | | not null | ||
| | | | ||
− | | Network login. | + | | Network login. |
− | |- | + | | AK_Employee_LoginID |
+ | |- | ||
| ManagerID | | ManagerID | ||
| int | | int | ||
| null | | null | ||
| | | | ||
− | | Manager to whom the employee is assigned. Foreign Key to Employee.M | + | | Manager to whom the employee is assigned. Foreign Key to Employee.M |
− | |- | + | | IX_Employee_ManagerID |
+ | |- | ||
| Title | | Title | ||
| nvarchar(50) | | nvarchar(50) | ||
| not null | | not null | ||
| | | | ||
− | | Work title such as Buyer or Sales Representative. | + | | Work title such as Buyer or Sales Representative. |
− | |- | + | | |
+ | |- | ||
| BirthDate | | BirthDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
− | | Date of birth. | + | | Date of birth. |
− | |- | + | | |
+ | |- | ||
| MaritalStatus | | MaritalStatus | ||
| nchar(1) | | nchar(1) | ||
| not null | | not null | ||
| | | | ||
− | | M = Married, S = Single | + | | M = Married, S = Single |
− | |- | + | | |
+ | |- | ||
| Gender | | Gender | ||
| nchar(1) | | nchar(1) | ||
| not null | | not null | ||
| | | | ||
− | | M = Male, F = Female | + | | M = Male, F = Female |
− | |- | + | | |
+ | |- | ||
| HireDate | | HireDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| | | | ||
− | | Employee hired on this date. | + | | Employee hired on this date. |
− | |- | + | | |
+ | |- | ||
| SalariedFlag | | SalariedFlag | ||
| Flag | | Flag | ||
| not null | | not null | ||
| (1) | | (1) | ||
− | | Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining. | + | | Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining. |
− | |- | + | | |
+ | |- | ||
| VacationHours | | VacationHours | ||
| smallint | | smallint | ||
| not null | | not null | ||
| (0) | | (0) | ||
− | | Number of available vacation hours. | + | | Number of available vacation hours. |
− | |- | + | | |
+ | |- | ||
| SickLeaveHours | | SickLeaveHours | ||
| smallint | | smallint | ||
| not null | | not null | ||
| (0) | | (0) | ||
− | | Number of available sick leave hours. | + | | Number of available sick leave hours. |
− | |- | + | | |
+ | |- | ||
| CurrentFlag | | CurrentFlag | ||
| Flag | | Flag | ||
| not null | | not null | ||
| (1) | | (1) | ||
− | | 0 = Inactive, 1 = Active | + | | 0 = Inactive, 1 = Active |
− | |- | + | | |
+ | |- | ||
| rowguid | | rowguid | ||
| uniqueidentifier | | uniqueidentifier | ||
| not null | | not null | ||
| (NEWID()) | | (NEWID()) | ||
− | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. |
− | |- | + | | AK_Employee_rowguid |
+ | |- | ||
| ModifiedDate | | ModifiedDate | ||
| datetime | | datetime | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
− | | Date and time the record was last updated. | + | | Date and time the record was last updated. |
+ | | | ||
|} | |} | ||
Line 545: | Line 400: | ||
| dEmployee | | dEmployee | ||
| INSTEAD OF DELETE | | INSTEAD OF DELETE | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |