Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions