| ||
It is a common practice to write queries that involve data from views and tables. You can mix data from both views and tables in several ways, such as joining tables with views. The following example demonstrates how to mix data from the HumanResources.vEmployeeDepartment view and the HumanResources.EmployeeAddress and Person.Address table. You can access this sample code from \Ch08\SampleCh0812.sql.
SELECT HumanResources.vEmployeeDepartment.*, AddressLine1, City, PostalCode FROM HumanResources.EmployeeAddress INNER JOIN Person.Address ON HumanResources.EmployeeAddress.AddressID = Person.Address.AddressID INNER JOIN HumanResources.vEmployeeDepartment ON HumanResources.EmployeeAddress.EmployeeID = HumanResources.vEmployeeDepartment.EmployeeID
| ||