← All tables and views
AdventureWorks OLTP view
HumanResources.vEmployee
Native view in the AdventureWorks OLTP sample database.
290rows
18 columns
Schema from the provider contract| Column | Type | Nullable | Key | References |
|---|---|---|---|---|
BusinessEntityID | | yes | — | — |
Title | | yes | — | — |
FirstName | | yes | — | — |
MiddleName | | yes | — | — |
LastName | | yes | — | — |
Suffix | | yes | — | — |
JobTitle | | yes | — | — |
PhoneNumber | | yes | — | — |
PhoneNumberType | | yes | — | — |
EmailAddress | | yes | — | — |
EmailPromotion | | yes | — | — |
AddressLine1 | | yes | — | — |
AddressLine2 | | yes | — | — |
City | | yes | — | — |
StateProvinceName | | yes | — | — |
PostalCode | | yes | — | — |
CountryRegionName | | yes | — | — |
AdditionalContactInfo | | yes | — | — |
View definition
CREATE VIEW "HumanResources.vEmployee" AS
SELECT
e."BusinessEntityID"
,p."Title"
,p."FirstName"
,p."MiddleName"
,p."LastName"
,p."Suffix"
,e."JobTitle"
,pp."PhoneNumber"
,pnt."Name" AS "PhoneNumberType"
,ea."EmailAddress"
,p."EmailPromotion"
,a."AddressLine1"
,a."AddressLine2"
,a."City"
,sp."Name" AS "StateProvinceName"
,a."PostalCode"
,cr."Name" AS "CountryRegionName"
,p."AdditionalContactInfo"
FROM "HumanResources.Employee" e
INNER JOIN "Person.Person" p
ON p."BusinessEntityID" = e."BusinessEntityID"
INNER JOIN "Person.BusinessEntityAddress" bea
ON bea."BusinessEntityID" = e."BusinessEntityID"
INNER JOIN "Person.Address" a
ON a."AddressID" = bea."AddressID"
INNER JOIN "Person.StateProvince" sp
ON sp."StateProvinceID" = a."StateProvinceID"
INNER JOIN "Person.CountryRegion" cr
ON cr."CountryRegionCode" = sp."CountryRegionCode"
LEFT OUTER JOIN "Person.PersonPhone" pp
ON pp.BusinessEntityID = p."BusinessEntityID"
LEFT OUTER JOIN "Person.PhoneNumberType" pnt
ON pp."PhoneNumberTypeID" = pnt."PhoneNumberTypeID"
LEFT OUTER JOIN "Person.EmailAddress" ea
ON p."BusinessEntityID" = ea."BusinessEntityID"Data preview
Sample records
| BusinessEntityID | Title | FirstName | MiddleName | LastName | Suffix | JobTitle |
|---|---|---|---|---|---|---|
| 1 | NULL | Ken | J | Sánchez | NULL | Chief Executive Officer |
| 2 | NULL | Terri | Lee | Duffy | NULL | Vice President of Engineering |
| 3 | NULL | Roberto | NULL | Tamburello | NULL | Engineering Manager |
| 4 | NULL | Rob | NULL | Walters | NULL | Senior Tool Designer |
| 5 | Ms. | Gail | A | Erickson | NULL | Design Engineer |
| 6 | Mr. | Jossef | H | Goldberg | NULL | Design Engineer |
| 7 | NULL | Dylan | A | Miller | NULL | Research and Development Manager |
| 8 | NULL | Diane | L | Margheim | NULL | Research and Development Engineer |