I hit a roadblock when typing up commands in SQL Fiddle (version: MySQL 5.7), computer science homework help
*Can someone please help me resolve this issue:
I have typed in the following commands (below) in SQL Fiddle (version: MYSQL 5.6), and within Fiddle my commands were approved and I received the green check mark, until I got to the last set of commands that are in bold text and then I received the following error shown in the attachment:
CREATE TABLE CUSTOMER (
CustomerID INT NOT NULL AUTO_INCREMENT,
FirstName VARCHAR(30) NOT NULL,
LastName VARCHAR(30) NOT NULL,
Address VARCHAR(100) NOT NULL,
APT VARCHAR(30),
City VARCHAR(60) NOT NULL,
ST CHAR(2) NOT NULL,
ZIP VARCHAR(9) NOT NULL,
HomePhone VARCHAR(11) NOT NULL,
CellPhone VARCHAR(11) NOT NULL,
OtherPhone VARCHAR(11),
PRIMARY KEY(CustomerID));
CREATE TABLE DONUT_TYPES(
DonutID INT NOT NULL AUTO_INCREMENT,
Name VARCHAR (30) NOT NULL,
Description VARCHAR (50) NOT NULL,
UnitPrice decimal (3,2) NOT NULL,
PRIMARY KEY(DonutID));
CREATE TABLE ORDER_LINE_ITEM(
SalesOrderID INT NOT NULL,
DonutID INT NOT NULL,
Qty INT NOT NULL,
PRIMARY KEY(SalesOrderID),
FOREIGN KEY(DonutID)REFERENCES DONUT_TYPES(DonutID));
CREATE TABLE SALES_ORDER(
SalesOrderID INT NOT NULL AUTO_INCREMENT,
OrderDate DATETIME NOT NULL,
CustNotes TEXT,
CustomerID INT NOT NULL,
PRIMARY KEY(SalesOrderID),
FOREIGN KEY(CustomerID)REFERENCES CUSTOMER(CustomerID));
CREATE VIEW CUSTOMER_INFO AS
SELECT CustomerID,
CONCAT(FirstName,” “,LastName)
AS FullName, Address, City, ST, ZIP,
HomePhone, CellPhone, OtherPhone
FROM CUSTOMER;
CREATE INDEX Name ON DONUT_TYPES(Name);
INSERT INTO CUSTOMER
(FirstName, LastName, Address, APT, City, ST, ZIP,
HomePhone, CellPhone, OtherPhone)
VALUES(‘Rick’, ‘Fields’, ‘101 Fast Lane’, 3, ‘Bronx’,
‘NY’, 96096, 7093214567, 7093224678, 7091234567);
INSERT INTO CUSTOMER
(FirstName, LastName, Address, APT, City, ST, ZIP,
HomePhone, CellPhone, OtherPhone)
VALUES(‘Mike’, ‘Butcher’, ‘207 Slow Lane’, 9, ‘Brooklyn’,
‘NY’, 96035, 7115611348, 7175617889, 7175663000);
INSERT INTO CUSTOMER
(FirstName, LastName, Address, APT, City, ST, ZIP,
HomePhone, CellPhone, OtherPhone)
VALUES(‘Katy’, ‘Moore’, ‘919 Up Street’, 101, ‘Brooklyn’,
‘NY’, 96077, 7115612289, 7175613577, 7175680214);
INSERT INTO DONUT_TYPES
(Name, Description, UnitPrice)
VALUES(‘Plain’, ‘Plain Donut’,’1.50′);
INSERT INTO DONUT_TYPES
(Name, Description, UnitPrice)
VALUES(‘Glazed’, ‘Glazed Donut’, ‘1.75’);
INSERT INTO DONUT_TYPES
(Name, Description, UnitPrice)
VALUES(‘Cinnamon’, ‘Cinnamon Donut’, ‘1.75’);
INSERT INTO DONUT_TYPES
(Name, Description, UnitPrice)
VALUES(‘Chocolate’, ‘Chocolate Donut’, ‘1.75’);
INSERT INTO DONUT_TYPES
(Name, Description, UnitPrice)
VALUES(‘Sprinkle’, ‘Sprinkle Donut’, ‘1.75’);
INSERT INTO DONUT_TYPES
(Name, Description, UnitPrice)
VALUES(‘Gluten-Free’, ‘Gluten-Free Donut’, ‘2.00’);
INSERT INTO SALES_ORDER(CustomerID, OrderDate)
VALUES(1,NOW());
INSERT INTO ORDER_LINE_ITEM VALUES(1,1,1);
INSERT INTO ORDER_LINE_ITEM VALUES(1,2,5);
INSERT INTO ORDER_LINE_ITEM VALUES(1,3,12);
INSERT INTO ORDER_LINE_ITEM VALUES(1,4,3);
INSERT INTO ORDER_LINE_ITEM VALUES(1,5,4);
INSERT INTO ORDER_LINE_ITEM VALUES(1,6,5);
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


