Person.vStateProvinceCountryRegion
Documentation | AdventureWorks |
Schema | Person |
Name | vStateProvinceCountryRegion |
Module | People |
Joins StateProvince table with CountryRegion table.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | StateProvinceID | int | ||||||
2 | StateProvinceCode | nchar(3) | ||||||
3 | IsOnlyStateProvinceFlag | bit | ||||||
4 | StateProvinceName | nvarchar(50) | ||||||
5 | TerritoryID | int | ||||||
6 | CountryRegionCode | nvarchar(3) | ||||||
7 | CountryRegionName | nvarchar(50) |
Uses
Name |
---|
Person.vStateProvinceCountryRegion
|
Script
CREATE VIEW [Person].[vStateProvinceCountryRegion] WITH SCHEMABINDING AS SELECT sp.[StateProvinceID] ,sp.[StateProvinceCode] ,sp.[IsOnlyStateProvinceFlag] ,sp.[Name] AS [StateProvinceName] ,sp.[TerritoryID] ,cr.[CountryRegionCode] ,cr.[Name] AS [CountryRegionName] FROM [Person].[StateProvince] sp INNER JOIN [Person].[CountryRegion] cr ON sp.[CountryRegionCode] = cr.[CountryRegionCode]; |
Exported: 2019-02-04 23:13, Last imported: 2018-03-07 11:56