Owner: | Sales |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 480 |
Index Size KB: | 16 |
Rows: | 19118 |
Description: | Cross-reference table mapping customers in the Contact table to their credit card information in the CreditCard table. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
|
|
ContactID | int | 4 |
|
|
|
Customer identification number. Foreign key to Contact.ContactID. | |
|
|
CreditCardID | int | 4 |
|
|
|
Credit card identification number. Foreign key to CreditCard.CreditCardID. | |
|
ModifiedDate | datetime | 8 |
|
(getdate()) |
|
|
Date and time the record was last updated. |
Index | Primary | Unique | Description | |
|
PK_ContactCreditCard_ContactID_CreditCardID |
|
|
Primary key (clustered) constraint |
Table | Foreign Key | Primary Key or Unique Constraint | |
|
Person.Contact | FK_ContactCreditCard_Contact_ContactID | PK_Contact_ContactID |
|
Sales.CreditCard | FK_ContactCreditCard_CreditCard_CreditCardID | PK_CreditCard_CreditCardID |
Objects that [Sales].[ContactCreditCard] depends on
Object Name | Owner | Object Type | Dep Level | |
|
Name | dbo | User Defined type | 1 |
|
NameStyle | dbo | User Defined type | 1 |
|
Phone | dbo | User Defined type | 1 |
|
Contact | Person | Table | 2 |
|
CreditCard | Sales | Table | 2 |
CREATE TABLE [ContactCreditCard] (
[ContactID] [int] NOT NULL ,
[CreditCardID] [int] NOT NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ContactCreditCard_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_ContactCreditCard_ContactID_CreditCardID] PRIMARY KEY CLUSTERED
(
[ContactID],
[CreditCardID]
) ON [PRIMARY] ,
CONSTRAINT [FK_ContactCreditCard_Contact_ContactID] FOREIGN KEY
(
[ContactID]
) REFERENCES [Contact] (
[ContactID]
),
CONSTRAINT [FK_ContactCreditCard_CreditCard_CreditCardID] FOREIGN KEY
(
[CreditCardID]
) REFERENCES [CreditCard] (
[CreditCardID]
)
) ON [PRIMARY]
GO
See Also
List of tables