Question: I am doing an assignment for INSS 421. This involves using SQL to create tables and then we do inquiries on them. I have three
I am doing an assignment for INSS 421. This involves using SQL to create tables and then we do inquiries on them. I have three tables that need to be created, but after creating the first one, I am now having issues creating the second. It is giving me a missing right parenthesis error, which tells me something is wrong with my foreign key in the second table or I put in the primary key in wrong in the first table. Can someone please look at my code and tell me what the issue is?
Coding for first table I created.
SQL> CREATE TABLE ICECREAM
(IcecreamID char(10) Primary Key,
Ice_cream_flavor char(20),
Price_per_scoop char(10),
Year_first_offered char(10),
Selling_status char(10));
Table ICECREAM created
Then I attempted to create the second table with this coding:
SQL> CREATE TABLE RECIPE
2 (ICECREAMID char(10) Foreign Key,
3 Ingredient_ID char(10) Primary Key,
4 Quantity_Used/Pint char(10));
* I receive the right parenthesis error but they are correct. Is my wording wrong with the primary and foreign key?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
