Getting this error when adding the parts table: Msg 8110, Level 16, State 0, Line 1 Cannot add multiple PRIMARY KEY constraints to table 'Service_Parts'. Getting similar errors for the other tables....The first 2 had no errors but the others have errors.........Here is the code which contains errors..... CREATE TABLE Service_Parts( Part_Number int NOT NULL, Service_ID VARCHAR(80), PRIMARY KEY (Service_ID), PRIMARY KEY (Part_Number), FOREIGN KEY (Part_Number ) REFERENCES Part(Part_Number), FOREIGN KEY (Service_ID) REFERENCES ServiceRecordCalender(Service_ID) ); ServiceRecordCalender Table: CREATE TABLE ServiceRecordCalender( Service_ID VARCHAR(80), DateCalled DATE, DateOfService DATE, Serial_Number int NOT NULL, Technician_ID int NOT NULL, PRIMARY KEY (Service_ID ), FOREIGN KEY (Technician_ID ) REFERENCES Technician(Technician_ID ), FOREIGN KEY (Serial_Number ) REFERENCES Appliance(Serial_Number ), FOREIGN KEY (DateOfService ) REFERENCES Technician(DateOfService ) ); Technician Table: CREATE TABLE Technician( Technician_ID int NOT NULL, DateOfService DATE, OrderParts VARCHAR(80), PRIMARY KEY (Technician_ID) );

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter6: Additional Database Objects
Section: Chapter Questions
Problem 1HOA
icon
Related questions
Question

Getting this error when adding the parts table: Msg 8110, Level 16, State 0, Line 1 Cannot add multiple PRIMARY KEY constraints to table 'Service_Parts'.

Getting similar errors for the other tables....The first 2 had no errors but the others have errors.........Here is the code which contains errors..... CREATE TABLE Service_Parts( Part_Number int NOT NULL, Service_ID VARCHAR(80), PRIMARY KEY (Service_ID), PRIMARY KEY (Part_Number), FOREIGN KEY (Part_Number ) REFERENCES Part(Part_Number), FOREIGN KEY (Service_ID) REFERENCES ServiceRecordCalender(Service_ID) ); ServiceRecordCalender Table: CREATE TABLE ServiceRecordCalender( Service_ID VARCHAR(80), DateCalled DATE, DateOfService DATE, Serial_Number int NOT NULL, Technician_ID int NOT NULL, PRIMARY KEY (Service_ID ), FOREIGN KEY (Technician_ID ) REFERENCES Technician(Technician_ID ), FOREIGN KEY (Serial_Number ) REFERENCES Appliance(Serial_Number ), FOREIGN KEY (DateOfService ) REFERENCES Technician(DateOfService ) ); Technician Table: CREATE TABLE Technician( Technician_ID int NOT NULL, DateOfService DATE, OrderParts VARCHAR(80), PRIMARY KEY (Technician_ID) );

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage