Table: [AdventureWorks2016CTP3].[Sales].[PersonCreditCard]

CollapseAll image

Collapse image Table properties


Name  Value 
 Schema  [Sales]
 Owner  [dbo]
 Table is replicated   
 Creation date  23.10.2015
 ID  50099219
 Located on  PRIMARY
 Data size KB  480 KB
 Index size KB  16 KB
 Rows  19118
 ChangeTrackingEnabled   
 FileStreamFileGroup   
 FileStreamPartitionScheme   
 LockEscalation  TABLE
 TrackColumnsUpdatedEnabled   
 Table is filetable   
 Filetable directory   
 Filetable collate   
 Filetable primary key  [PK_PersonCreditCard_BusinessEntityID_CreditCardID]
 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 OFF

Collapse image Columns


    Name  Description  Data type  Max length  Nullable  Default IsGUID  SPARSE Computed value
Primary key Foreign key BusinessEntityID     int 4        
Primary key Foreign key CreditCardID     int 4        
    ModifiedDate     datetime 8   (getdate())    
Total: 3 column(s)

Collapse image Indexes


Index  Description  Primary  Unique  Size KB 
[PK_PersonCreditCard_BusinessEntityID_CreditCardID] BusinessEntityID   496 0
Total: 1 Index/indexes

Collapse image Columnstore indexes


No columnstore indexes exist

Collapse image Referenced tables


Table  Primary key or unique constraint  Foreign key 
[Sales].[CreditCard] PK_CreditCard_CreditCardID FK_PersonCreditCard_CreditCard_CreditCardID
[Person].[Person] PK_Person_BusinessEntityID FK_PersonCreditCard_Person_BusinessEntityID
Total: 2 table(s)

Collapse image Objects that [Sales].[PersonCreditCard] depends on


Object name Object type Dep level
[Sales] Schema 1
[Sales].[CreditCard] Table 1
[Person].[Person] Table 1
Total 3 object(s)

Collapse image Extended properties


Name  Value 
MS_Description Cross-reference table mapping people to their credit card information in the CreditCard 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 OFF
GO
CREATE TABLE [Sales].[PersonCreditCard] (
        [BusinessEntityID]     [int] NOT NULL,
        [CreditCardID]         [int] NOT NULL,
        [ModifiedDate]         [datetime] NOT NULL,
        CONSTRAINT [PK_PersonCreditCard_BusinessEntityID_CreditCardID]
        PRIMARY KEY
        CLUSTERED
        ([BusinessEntityID], [CreditCardID])
    ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'CONSTRAINT', N'PK_PersonCreditCard_BusinessEntityID_CreditCardID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'INDEX', N'PK_PersonCreditCard_BusinessEntityID_CreditCardID'
GO
ALTER TABLE [Sales].[PersonCreditCard]
    ADD
    CONSTRAINT [DF_PersonCreditCard_ModifiedDate]
    DEFAULT (getdate()) FOR [ModifiedDate]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'CONSTRAINT', N'DF_PersonCreditCard_ModifiedDate'
GO
ALTER TABLE [Sales].[PersonCreditCard]
    WITH CHECK
    ADD CONSTRAINT [FK_PersonCreditCard_CreditCard_CreditCardID]
    FOREIGN KEY ([CreditCardID]) REFERENCES [Sales].[CreditCard] ([CreditCardID])
ALTER TABLE [Sales].[PersonCreditCard]
    CHECK CONSTRAINT [FK_PersonCreditCard_CreditCard_CreditCardID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing CreditCard.CreditCardID.', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'CONSTRAINT', N'FK_PersonCreditCard_CreditCard_CreditCardID'
GO
ALTER TABLE [Sales].[PersonCreditCard]
    WITH CHECK
    ADD CONSTRAINT [FK_PersonCreditCard_Person_BusinessEntityID]
    FOREIGN KEY ([BusinessEntityID]) REFERENCES [Person].[Person] ([BusinessEntityID])
ALTER TABLE [Sales].[PersonCreditCard]
    CHECK CONSTRAINT [FK_PersonCreditCard_Person_BusinessEntityID]

GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing Person.BusinessEntityID.', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'CONSTRAINT', N'FK_PersonCreditCard_Person_BusinessEntityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Business entity identification number. Foreign key to Person.BusinessEntityID.', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'COLUMN', N'BusinessEntityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Credit card identification number. Foreign key to CreditCard.CreditCardID.', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'COLUMN', N'CreditCardID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Cross-reference table mapping people to their credit card information in the CreditCard table. ', 'SCHEMA', N'Sales', 'TABLE', N'PersonCreditCard', NULL, NULL
GO

Collapse image See also


List of tables