Editing HumanResources.Employee (table)

Jump to: navigation, search

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"
|- valign="top"
+
|-
 
| '''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
|- valign="top"
+
|-
 
| PK_Employee_EmployeeID
 
| PK_Employee_EmployeeID
 
| EmployeeID
 
| EmployeeID
Line 133: Line 135:
 
| '''Type
 
| '''Type
 
| '''Columns
 
| '''Columns
 
+
|- valign="top"
+
|-
 
| AK_Employee_LoginID
 
| AK_Employee_LoginID
 
| Unique
 
| Unique
 
| LoginID
 
| LoginID
|- valign="top"
+
|-
 
| AK_Employee_NationalIDNumber
 
| AK_Employee_NationalIDNumber
 
| Unique
 
| Unique
 
| NationalIDNumber
 
| NationalIDNumber
|- valign="top"
+
|-
 
| AK_Employee_rowguid
 
| AK_Employee_rowguid
 
| Unique
 
| Unique
 
| rowguid
 
| rowguid
|- valign="top"
+
|-
 
| IX_Employee_ManagerID
 
| IX_Employee_ManagerID
 
|  
 
|  
Line 158: Line 160:
 
| '''Expression
 
| '''Expression
 
| '''Description
 
| '''Description
 
+
|- valign="top"
+
|-
 
| 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())
|- valign="top"
+
|-
 
| 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'
|- valign="top"
+
|-
 
| 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())
|- valign="top"
+
|-
 
| 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'
|- valign="top"
+
|-
 
| 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)
|- valign="top"
+
|-
 
| 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
 
+
|- valign="top"
+
|-
 
| [[Person.Contact_(table)|Person.Contact]]
 
| [[Person.Contact_(table)|Person.Contact]]
 
| ContactID
 
| ContactID
 
| ContactID
 
| ContactID
|- valign="top"
+
|-
 
| [[HumanResources.Employee_(table)|HumanResources.Employee]]
 
| [[HumanResources.Employee_(table)|HumanResources.Employee]]
 
| ManagerID
 
| ManagerID
Line 208: Line 210:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
 
+
|- valign="top"
+
|-
 
| [[HumanResources.Employee_(table)|HumanResources.Employee]]
 
| [[HumanResources.Employee_(table)|HumanResources.Employee]]
 
| EmployeeID
 
| EmployeeID
 
| ManagerID
 
| ManagerID
|- valign="top"
+
|-
 
| [[HumanResources.EmployeeAddress_(table)|HumanResources.EmployeeAddress]]
 
| [[HumanResources.EmployeeAddress_(table)|HumanResources.EmployeeAddress]]
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
|- valign="top"
+
|-
 
| [[HumanResources.EmployeeDepartmentHistory_(table)|HumanResources.EmployeeDepartmentHistory]]
 
| [[HumanResources.EmployeeDepartmentHistory_(table)|HumanResources.EmployeeDepartmentHistory]]
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
|- valign="top"
+
|-
 
| [[HumanResources.EmployeePayHistory_(table)|HumanResources.EmployeePayHistory]]
 
| [[HumanResources.EmployeePayHistory_(table)|HumanResources.EmployeePayHistory]]
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
|- valign="top"
+
|-
 
| [[HumanResources.JobCandidate_(table)|HumanResources.JobCandidate]]
 
| [[HumanResources.JobCandidate_(table)|HumanResources.JobCandidate]]
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
|- valign="top"
+
|-
 
| [[Purchasing.PurchaseOrderHeader_(table)|Purchasing.PurchaseOrderHeader]]
 
| [[Purchasing.PurchaseOrderHeader_(table)|Purchasing.PurchaseOrderHeader]]
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
 
| EmployeeID
|- valign="top"
+
|-
 
| [[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"
| '''Trigger
+
| '''Triggers
 
| '''Type
 
| '''Type
 
+
|- valign="top"
+
|-
 
| dEmployee
 
| dEmployee
 
| INSTEAD OF DELETE
 
| INSTEAD OF DELETE
 
|}
 
|}
  
==== Trigger dEmployee ====
+
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
  
|- valign="top"
+
|-
 
| Data Type
 
| Data Type
 
| Type
 
| Type
 
| [[dbo.Flag_(type)|dbo.Flag]]
 
| [[dbo.Flag_(type)|dbo.Flag]]
  
|- valign="top"
+
|-
 
| Schema
 
| Schema
 
| Schema
 
| Schema
Line 304: Line 306:
 
| '''Referencing Object
 
| '''Referencing Object
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| View
 
| View
 
| [[HumanResources.vEmployee_(view)|HumanResources.vEmployee]]
 
| [[HumanResources.vEmployee_(view)|HumanResources.vEmployee]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| View
 
| View
 
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
 
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| View
 
| View
 
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
 
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| View
 
| View
 
| [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]]
 
| [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| View
 
| View
 
| [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]]
 
| [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| Procedure
 
| Procedure
 
| [[dbo.uspGetEmployeeManagers_(procedure)|dbo.uspGetEmployeeManagers]]
 
| [[dbo.uspGetEmployeeManagers_(procedure)|dbo.uspGetEmployeeManagers]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| Procedure
 
| Procedure
 
| [[dbo.uspGetManagerEmployees_(procedure)|dbo.uspGetManagerEmployees]]
 
| [[dbo.uspGetManagerEmployees_(procedure)|dbo.uspGetManagerEmployees]]
  
|- valign="top"
+
|-
 
| Update
 
| Update
 
| Procedure
 
| Procedure
 
| [[HumanResources.uspUpdateEmployeeHireInfo_(procedure)|HumanResources.uspUpdateEmployeeHireInfo]]
 
| [[HumanResources.uspUpdateEmployeeHireInfo_(procedure)|HumanResources.uspUpdateEmployeeHireInfo]]
  
|- valign="top"
+
|-
 
| Update
 
| Update
 
| Procedure
 
| Procedure
 
| [[HumanResources.uspUpdateEmployeeLogin_(procedure)|HumanResources.uspUpdateEmployeeLogin]]
 
| [[HumanResources.uspUpdateEmployeeLogin_(procedure)|HumanResources.uspUpdateEmployeeLogin]]
  
|- valign="top"
+
|-
 
| Update
 
| Update
 
| Procedure
 
| Procedure
 
| [[HumanResources.uspUpdateEmployeePersonalInfo_(procedure)|HumanResources.uspUpdateEmployeePersonalInfo]]
 
| [[HumanResources.uspUpdateEmployeePersonalInfo_(procedure)|HumanResources.uspUpdateEmployeePersonalInfo]]
  
|- valign="top"
+
|-
 
| Select
 
| Select
 
| SQL table-valued-function
 
| SQL table-valued-function

Please note that all contributions to dbscript Online Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)