Table: [AdventureWorks2016CTP3].[Production].[ProductSubcategory]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [Production]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  994102582
 Located on  PRIMARY
 Data size KB  8 KB
 Index size KB  40 KB
 Rows  37
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_ProductSubcategory_ProductSubcategoryID]
 Filetable streamid unique   
 Filetable fullpath unique   
 Filetable is enabled   
 Is memory optimized   
 Durability  SCHEMA_AND_DATA

Collapse image Creation options


Name  Value 
QUOTED_IDENTIFIER ON
ANSI_NULLS ON
ANSI_PADDING ON

Collapse image Columns


      Name  Description  Data type  Max length  Nullable  Default IsGUID  SPARSE Computed value
Primary key Identity   ProductSubcategoryID     int 4        
    Foreign key ProductCategoryID     int 4        
      Name     [dbo].[Name] 50        
      rowguid     uniqueidentifier 16   (newid())  
      ModifiedDate     datetime 8   (getdate())    
Total: 5 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_ProductSubcategory_ProductSubcategoryID] ProductSubcategoryID   48 0
[AK_ProductSubcategory_Name] Name     16 0
[AK_ProductSubcategory_rowguid] rowguid     16 0
Total: 3 Index/indexes

Collapse image Columnstore indexes


No columnstore indexes exist

Collapse image Identity column


  Name  Seed  Increment  Not for replication 
 ProductSubcategoryID   1   1   

Collapse image Referencing tables


Table  Foreign key  Primary key or unique constraint 
[Production].[Product] FK_Product_ProductSubcategory_ProductSubcategoryID PK_ProductSubcategory_ProductSubcategoryID
Total: 1 table(s)

Collapse image Referenced tables


Table  Primary key or unique constraint  Foreign key 
[Production].[ProductCategory] PK_ProductCategory_ProductCategoryID FK_ProductSubcategory_ProductCategory_ProductCategoryID
Total: 1 table(s)

Collapse image Objects that depend on [Production].[ProductSubcategory]


Object name Object type Dep level
[Production].[Product] Table 1
Total 1 object(s)

Collapse image Objects that [Production].[ProductSubcategory] depends on


Object name Object type Dep level
[Production] Schema 1
[Production].[ProductCategory] Table 1
[dbo].[Name] Datatype 1
Total 3 object(s)

Collapse image Extended properties


Name  Value 
MS_Description Product subcategories. See ProductCategory table.

Collapse image 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

Collapse image SQL


SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
CREATE TABLE [Production].[ProductSubcategory] (
        [ProductSubcategoryID]     [int] IDENTITY(1, 1) NOT NULL,
        [ProductCategoryID]        [int] NOT NULL,
        [Name]                     [dbo].[Name] NOT NULL,
        [rowguid]                  [uniqueidentifier] NOT NULL ROWGUIDCOL,
        [ModifiedDate]             [datetime] NOT NULL,
        CONSTRAINT [PK_ProductSubcategory_ProductSubcategoryID]
        PRIMARY KEY
        CLUSTERED
        ([ProductSubcategoryID])
    ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'CONSTRAINT', N'PK_ProductSubcategory_ProductSubcategoryID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'INDEX', N'PK_ProductSubcategory_ProductSubcategoryID'
GO
ALTER TABLE [Production].[ProductSubcategory]
    ADD
    CONSTRAINT [DF_ProductSubcategory_ModifiedDate]
    DEFAULT (getdate()) FOR [ModifiedDate]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'CONSTRAINT', N'DF_ProductSubcategory_ModifiedDate'
GO
ALTER TABLE [Production].[ProductSubcategory]
    ADD
    CONSTRAINT [DF_ProductSubcategory_rowguid]
    DEFAULT (newid()) FOR [rowguid]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of NEWID()', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'CONSTRAINT', N'DF_ProductSubcategory_rowguid'
GO
ALTER TABLE [Production].[ProductSubcategory]
    WITH CHECK
    ADD CONSTRAINT [FK_ProductSubcategory_ProductCategory_ProductCategoryID]
    FOREIGN KEY ([ProductCategoryID]) REFERENCES [Production].[ProductCategory] ([ProductCategoryID])
ALTER TABLE [Production].[ProductSubcategory]
    CHECK CONSTRAINT [FK_ProductSubcategory_ProductCategory_ProductCategoryID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing ProductCategory.ProductCategoryID.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'CONSTRAINT', N'FK_ProductSubcategory_ProductCategory_ProductCategoryID'
GO
CREATE UNIQUE NONCLUSTERED INDEX [AK_ProductSubcategory_Name]
    ON [Production].[ProductSubcategory] ([Name])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'INDEX', N'AK_ProductSubcategory_Name'
GO
CREATE UNIQUE NONCLUSTERED INDEX [AK_ProductSubcategory_rowguid]
    ON [Production].[ProductSubcategory] ([rowguid])
    ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index. Used to support replication samples.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'INDEX', N'AK_ProductSubcategory_rowguid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Subcategory description.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'COLUMN', N'Name'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Product category identification number. Foreign key to ProductCategory.ProductCategoryID.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'COLUMN', N'ProductCategoryID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key for ProductSubcategory records.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'COLUMN', N'ProductSubcategoryID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', 'COLUMN', N'rowguid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Product subcategories. See ProductCategory table.', 'SCHEMA', N'Production', 'TABLE', N'ProductSubcategory', NULL, NULL
GO

Collapse image See also


List of tables