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 | ||
Line 8: | Line 8: | ||
| '''Description | | '''Description | ||
| Employee information such as salary, department, and title. | | Employee information such as salary, department, and title. | ||
+ | |- | ||
|} | |} | ||
+ | |||
=== Columns === | === Columns === | ||
Line 18: | Line 20: | ||
| '''Default | | '''Default | ||
| '''Description | | '''Description | ||
− | + | ||
|- valign="top" | |- valign="top" | ||
| EmployeeID | | EmployeeID | ||
Line 122: | Line 124: | ||
| '''Primary Key | | '''Primary Key | ||
| '''Columns | | '''Columns | ||
− | |- | + | |- |
| PK_Employee_EmployeeID | | PK_Employee_EmployeeID | ||
| EmployeeID | | EmployeeID | ||
Line 133: | Line 135: | ||
| '''Type | | '''Type | ||
| '''Columns | | '''Columns | ||
− | + | ||
− | |- | + | |- |
| AK_Employee_LoginID | | AK_Employee_LoginID | ||
| Unique | | Unique | ||
| LoginID | | LoginID | ||
− | |- | + | |- |
| AK_Employee_NationalIDNumber | | AK_Employee_NationalIDNumber | ||
| Unique | | Unique | ||
| NationalIDNumber | | NationalIDNumber | ||
− | |- | + | |- |
| AK_Employee_rowguid | | AK_Employee_rowguid | ||
| Unique | | Unique | ||
| rowguid | | rowguid | ||
− | |- | + | |- |
| IX_Employee_ManagerID | | IX_Employee_ManagerID | ||
| | | | ||
Line 158: | Line 160: | ||
| '''Expression | | '''Expression | ||
| '''Description | | '''Description | ||
− | + | ||
− | |- | + | |- |
| CK_Employee_BirthDate | | CK_Employee_BirthDate | ||
| ([BirthDate]>='1930-01-01' AND [BirthDate]<=dateadd(year,(-18),getdate())) | | ([BirthDate]>='1930-01-01' AND [BirthDate]<=dateadd(year,(-18),getdate())) | ||
| Check constraint [BirthDate] >= '1930-01-01' AND [BirthDate] <= dateadd(year,(-18),GETDATE()) | | Check constraint [BirthDate] >= '1930-01-01' AND [BirthDate] <= dateadd(year,(-18),GETDATE()) | ||
− | |- | + | |- |
| CK_Employee_Gender | | CK_Employee_Gender | ||
| (upper([Gender])='F' OR upper([Gender])='M') | | (upper([Gender])='F' OR upper([Gender])='M') | ||
| Check constraint [Gender]='f' OR [Gender]='m' OR [Gender]='F' OR [Gender]='M' | | Check constraint [Gender]='f' OR [Gender]='m' OR [Gender]='F' OR [Gender]='M' | ||
− | |- | + | |- |
| CK_Employee_HireDate | | CK_Employee_HireDate | ||
| ([HireDate]>='1996-07-01' AND [HireDate]<=dateadd(day,(1),getdate())) | | ([HireDate]>='1996-07-01' AND [HireDate]<=dateadd(day,(1),getdate())) | ||
| Check constraint [HireDate] >= '1996-07-01' AND [HireDate] <= dateadd(day,(1),GETDATE()) | | Check constraint [HireDate] >= '1996-07-01' AND [HireDate] <= dateadd(day,(1),GETDATE()) | ||
− | |- | + | |- |
| CK_Employee_MaritalStatus | | CK_Employee_MaritalStatus | ||
| (upper([MaritalStatus])='S' OR upper([MaritalStatus])='M') | | (upper([MaritalStatus])='S' OR upper([MaritalStatus])='M') | ||
| Check constraint [MaritalStatus]='s' OR [MaritalStatus]='m' OR [MaritalStatus]='S' OR [MaritalStatus]='M' | | Check constraint [MaritalStatus]='s' OR [MaritalStatus]='m' OR [MaritalStatus]='S' OR [MaritalStatus]='M' | ||
− | |- | + | |- |
| CK_Employee_SickLeaveHours | | CK_Employee_SickLeaveHours | ||
| ([SickLeaveHours]>=(0) AND [SickLeaveHours]<=(120)) | | ([SickLeaveHours]>=(0) AND [SickLeaveHours]<=(120)) | ||
| Check constraint [SickLeaveHours] >= (0) AND [SickLeaveHours] <= (120) | | Check constraint [SickLeaveHours] >= (0) AND [SickLeaveHours] <= (120) | ||
− | |- | + | |- |
| CK_Employee_VacationHours | | CK_Employee_VacationHours | ||
| ([VacationHours]>=(-40) AND [VacationHours]<=(240)) | | ([VacationHours]>=(-40) AND [VacationHours]<=(240)) | ||
Line 191: | Line 193: | ||
| '''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 208: | Line 210: | ||
| '''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 242: | Line 244: | ||
{| 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 | ||
|} | |} | ||
− | + | Trigger dEmployee | |
<pre> | <pre> | ||
CREATE TRIGGER [HumanResources].[dEmployee] ON [HumanResources].[Employee] | CREATE TRIGGER [HumanResources].[dEmployee] ON [HumanResources].[Employee] | ||
Line 277: | Line 279: | ||
END; | END; | ||
</pre> | </pre> | ||
− | + | ||
=== References === | === References === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
Line 285: | Line 287: | ||
| '''Referenced Object | | '''Referenced Object | ||
− | |- | + | |- |
| Data Type | | Data Type | ||
| Type | | Type | ||
| [[dbo.Flag_(type)|dbo.Flag]] | | [[dbo.Flag_(type)|dbo.Flag]] | ||
− | |- | + | |- |
| Schema | | Schema | ||
| Schema | | Schema | ||
Line 304: | Line 306: | ||
| '''Referencing Object | | '''Referencing Object | ||
− | |- | + | |- |
| Select | | Select | ||
| View | | View | ||
| [[HumanResources.vEmployee_(view)|HumanResources.vEmployee]] | | [[HumanResources.vEmployee_(view)|HumanResources.vEmployee]] | ||
− | |- | + | |- |
| Select | | Select | ||
| View | | View | ||
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]] | | [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]] | ||
− | |- | + | |- |
| Select | | Select | ||
| View | | View | ||
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]] | | [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]] | ||
− | |- | + | |- |
| Select | | Select | ||
| View | | View | ||
| [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]] | | [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]] | ||
− | |- | + | |- |
| Select | | Select | ||
| View | | View | ||
| [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]] | | [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]] | ||
− | |- | + | |- |
| Select | | Select | ||
| Procedure | | Procedure | ||
| [[dbo.uspGetEmployeeManagers_(procedure)|dbo.uspGetEmployeeManagers]] | | [[dbo.uspGetEmployeeManagers_(procedure)|dbo.uspGetEmployeeManagers]] | ||
− | |- | + | |- |
| Select | | Select | ||
| Procedure | | Procedure | ||
| [[dbo.uspGetManagerEmployees_(procedure)|dbo.uspGetManagerEmployees]] | | [[dbo.uspGetManagerEmployees_(procedure)|dbo.uspGetManagerEmployees]] | ||
− | |- | + | |- |
| Update | | Update | ||
| Procedure | | Procedure | ||
| [[HumanResources.uspUpdateEmployeeHireInfo_(procedure)|HumanResources.uspUpdateEmployeeHireInfo]] | | [[HumanResources.uspUpdateEmployeeHireInfo_(procedure)|HumanResources.uspUpdateEmployeeHireInfo]] | ||
− | |- | + | |- |
| Update | | Update | ||
| Procedure | | Procedure | ||
| [[HumanResources.uspUpdateEmployeeLogin_(procedure)|HumanResources.uspUpdateEmployeeLogin]] | | [[HumanResources.uspUpdateEmployeeLogin_(procedure)|HumanResources.uspUpdateEmployeeLogin]] | ||
− | |- | + | |- |
| Update | | Update | ||
| Procedure | | Procedure | ||
| [[HumanResources.uspUpdateEmployeePersonalInfo_(procedure)|HumanResources.uspUpdateEmployeePersonalInfo]] | | [[HumanResources.uspUpdateEmployeePersonalInfo_(procedure)|HumanResources.uspUpdateEmployeePersonalInfo]] | ||
− | |- | + | |- |
| Select | | Select | ||
| SQL table-valued-function | | SQL table-valued-function |