SQL>
SQL> CREATE TABLE Recipe
(Quantity_used DECIMAL (2,1)
FOREIGN KEY "ICECREAM_ID"
REFERENCES icecreamGT(Icecream_id),
FOREIGN KEY (ingredient_id) REFERENCES ingredient (Ingredient_name),
);
2 3 4 5 6 FOREIGN KEY "ICECREAM_ID"
*
ERROR at line 3:
ORA-00907: missing right parenthesis

更新:帶有調整的逗號和括號的新代碼
CREATE TABLE Recipe
(
Quantity_used DECIMAL (2,1),
FOREIGN KEY (ID_icecream)
REFERENCES icecreamGT(Icecream_id)
FOREIGN KEY (ID_ingredient)
REFERENCES ingredient(Ingredient_name)
);

uj5u.com熱心網友回復:
您的宣告沒有:
- 表中的一
icecream_id列recipe; - 表中的一
ingredient_id列recipe; - 逗號在正確的地方;
()"ICECREAM_ID"外鍵列串列中識別符號周圍的括號。
IE:
CREATE TABLE Recipe(
Quantity_used DECIMAL (2,1),
icecream_id NUMBER,
ingredient_id NUMBER,
FOREIGN KEY (ICECREAM_ID) REFERENCES icecreamGT(Icecream_id),
FOREIGN KEY (ingredient_id) REFERENCES ingredient (Ingredient_name)
);
db<>在這里擺弄
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/440064.html
