我想用外鍵創建表,但我一直在獲取缺少的關鍵字錯誤。任何可能導致問題的頭文件?SQL:缺少關鍵字,外鍵
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);
錯誤讀取: 錯誤在第9行:ORA-00905:缺少關鍵字
我已經創建了其他表(BRANCH,CARTYPE,CUSTOMER),並設置其主鍵爲(BrName, CarTypeCode,CustId)。
REFRENCES應該是引用我想.. –