Northwind › Tables
CustomerCustomerDemo table
Junction table between customers and demographics. Also empty. 0 rows.
Columns
| # | Name | Type | Not null | Default | Key | References |
|---|---|---|---|---|---|---|
| 0 | CustomerID |
TEXT |
yes | — | PK 1 | Customers.CustomerID |
| 1 | CustomerTypeID |
TEXT |
yes | — | PK 2 | CustomerDemographics.CustomerTypeID |
Indexes
| Name | Columns | Unique | Created by |
|---|---|---|---|
sqlite_autoindex_CustomerCustomerDemo_1 |
CustomerID, CustomerTypeID |
yes | PRIMARY KEY |
Referenced by
No other table has a foreign key pointing at CustomerCustomerDemo.
Definition
CREATE TABLE CustomerCustomerDemo (
CustomerID TEXT NOT NULL REFERENCES Customers (CustomerID),
CustomerTypeID TEXT NOT NULL REFERENCES CustomerDemographics (CustomerTypeID),
PRIMARY KEY (CustomerID, CustomerTypeID)
)