I am trying to create a table with a foreign key, but I keep on getting a missing keyword error. Any headers on what may be causing the problem?
Create table CAR
(vin varchar2(7),
SaleDate date,
SalePrice number (7,2),
Balance_due number (7, 2),
date_bought date,
miles number(6),
CONSTRAINT pkcar PRIMARY KEY(vin),
CONSTRAINT fkcar1 FOREIGN KEY(BrName) REFRENCES BRANCH,
CONSTRAINT fkcar4 FOREIGN KEY(CarTypeCode) REFRENCES CARTYPE,
CONSTRAINT fkcar2 FOREIGN KEY(BuyerId) REFRENCES CUSTOMER,
CONSTRAINT fkcar3 FOREIGN KEY(SellerId) REFRENCES CUSTOMER);
The error reads: Error at line 9: ORA-00905:missing keyword
I have already created the other tables (BRANCH, CARTYPE, CUSTOMER) and set their primary keys as (BrName, CarTypeCode, CustId).