← 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
ColumnTypeNullableKeyReferences
BusinessEntityIDyes——
Titleyes——
FirstNameyes——
MiddleNameyes——
LastNameyes——
Suffixyes——
JobTitleyes——
PhoneNumberyes——
PhoneNumberTypeyes——
EmailAddressyes——
EmailPromotionyes——
AddressLine1yes——
AddressLine2yes——
Cityyes——
StateProvinceNameyes——
PostalCodeyes——
CountryRegionNameyes——
AdditionalContactInfoyes——

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

290 rows available
BusinessEntityIDTitleFirstNameMiddleNameLastNameSuffixJobTitle
1NULLKenJSánchezNULLChief Executive Officer
2NULLTerriLeeDuffyNULLVice President of Engineering
3NULLRobertoNULLTamburelloNULLEngineering Manager
4NULLRobNULLWaltersNULLSenior Tool Designer
5Ms.GailAEricksonNULLDesign Engineer
6Mr.JossefHGoldbergNULLDesign Engineer
7NULLDylanAMillerNULLResearch and Development Manager
8NULLDianeLMargheimNULLResearch and Development Engineer