Table:
[AdventureWorks2016CTP3].[Person].[CountryRegion]
Table properties
| Name | Value |
| Schema | [Person] |
| Owner | [dbo] |
| Table is replicated | |
| Creation date | 23.10.2015 |
| ID | 1157579162 |
| Located on | PRIMARY |
| Data size KB | 16 KB |
| Index size KB | 48 KB |
| Rows | 238 |
| ChangeTrackingEnabled | |
| FileStreamFileGroup | |
| FileStreamPartitionScheme | |
| LockEscalation | TABLE |
| TrackColumnsUpdatedEnabled | |
| Table is filetable | |
| Filetable directory | |
| Filetable collate | |
| Filetable primary key | [PK_CountryRegion_CountryRegionCode] |
| Filetable streamid unique | |
| Filetable fullpath unique | |
| Filetable is enabled | |
| Is memory optimized | |
| Durability | SCHEMA_AND_DATA |
Creation options
| Name | Value |
| QUOTED_IDENTIFIER | ON |
| ANSI_NULLS | ON |
| ANSI_PADDING | ON |
Columns
| Name | Description | Data type | Max length | Nullable | Default | IsGUID | SPARSE | Computed value | ||
| CountryRegionCode | nvarchar | 3 | |||||||
| Name | [dbo].[Name] | 50 | ||||||||
| ModifiedDate | datetime | 8 | (getdate()) |
Indexes
| Index | Description | Primary | Unique | Size KB | ||
| [PK_CountryRegion_CountryRegionCode] | CountryRegionCode | ![]() |
![]() |
64 | 0 | |
| [AK_CountryRegion_Name] | Name | ![]() |
32 | 0 |
Columnstore indexes
Referencing tables
| Table | Foreign key | Primary key or unique constraint |
| [Person].[StateProvince] | FK_StateProvince_CountryRegion_CountryRegionCode | PK_CountryRegion_CountryRegionCode |
| [Sales].[CountryRegionCurrency] | FK_CountryRegionCurrency_CountryRegion_CountryRegionCode | PK_CountryRegion_CountryRegionCode |
| [Sales].[SalesTerritory] | FK_SalesTerritory_CountryRegion_CountryRegionCode | PK_CountryRegion_CountryRegionCode |
Objects that depend on [Person].[CountryRegion]
| Object name | Object type | Dep level |
| [Sales].[CountryRegionCurrency] | Table | 1 |
| [Sales].[SalesTerritory] | Table | 1 |
| [Person].[StateProvince] | Table | 1 |
| [HumanResources].[vEmployee] | View | 1 |
| [Sales].[vIndividualCustomer] | View | 1 |
| [Sales].[vSalesPerson] | View | 1 |
| [Person].[vStateProvinceCountryRegion] | View | 1 |
| [Sales].[vStoreWithAddresses] | View | 1 |
| [Purchasing].[vVendorWithAddresses] | View | 1 |
Objects that [Person].[CountryRegion] depends on
| Object name | Object type | Dep level |
| [Person] | Schema | 1 |
| [dbo].[Name] | Datatype | 1 |
Extended properties
| Name | Value |
| MS_Description | Lookup table containing the ISO standard codes for countries and regions. |
Table options
| Name | Value |
| Pintable | OFF |
| Table lock on bulk load | OFF |
| Insert row lock | OFF |
| Text in row | 0 |
| Large value types out of row | OFF |
SQL
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON SET ANSI_PADDING ON GO CREATE TABLE [Person].[CountryRegion] ( [CountryRegionCode] [nvarchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Name] [dbo].[Name] NOT NULL, [ModifiedDate] [datetime] NOT NULL, CONSTRAINT [PK_CountryRegion_CountryRegionCode] PRIMARY KEY CLUSTERED ([CountryRegionCode]) ON [PRIMARY] ) ON [PRIMARY] GO EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'CONSTRAINT', N'PK_CountryRegion_CountryRegionCode' GO EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'INDEX', N'PK_CountryRegion_CountryRegionCode' GO ALTER TABLE [Person].[CountryRegion] ADD CONSTRAINT [DF_CountryRegion_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate] GO EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'CONSTRAINT', N'DF_CountryRegion_ModifiedDate' GO CREATE UNIQUE NONCLUSTERED INDEX [AK_CountryRegion_Name] ON [Person].[CountryRegion] ([Name]) ON [PRIMARY] GO EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index.', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'INDEX', N'AK_CountryRegion_Name' GO EXEC sp_addextendedproperty N'MS_Description', N'ISO standard code for countries and regions.', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'COLUMN', N'CountryRegionCode' GO EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'COLUMN', N'ModifiedDate' GO EXEC sp_addextendedproperty N'MS_Description', N'Country or region name.', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', 'COLUMN', N'Name' GO EXEC sp_addextendedproperty N'MS_Description', N'Lookup table containing the ISO standard codes for countries and regions.', 'SCHEMA', N'Person', 'TABLE', N'CountryRegion', NULL, NULL GO |
See also