Available under Creative Commons-ShareAlike 4.0 International License.
CREATE TABLE Customer
( CustID INTEGER PRIMARY KEY, CustName CHAR(35) )
CREATE TABLE Orders
( OrderID INTEGER PRIMARY KEY, CustID INTEGER REFERENCES Customer(CustID), OrderDate DATETIME )
The referential integrity is set when creating the table (Orders) with the FK.
- 1366 reads