Question: SQL Script Error I made corrections after some troubleshooting, but now my SQL script yields the following error: ERROR 1064 (42000) at line 37: You

SQL Script Error

I made corrections after some troubleshooting, but now my SQL script yields the following error:

ERROR 1064 (42000) at line 37: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'John Doe','Doe@xxxxx.com','3013218295','Maryland','United States',123), (501, 'J' at line 4 

Can someone help me fix this script so it works:

Create Table Lawyers ( lawyerID INT, lawyerName varchar(25), lawyerEmail varchar(25), lawyerPhone varchar(11), lawyerState varchar(10), lawyerCountry varchar(12), CONSTRAINT lawyerID_pk PRIMARY KEY (lawyerID));

CREATE TABLE Client (

ClientID INT, ClientName varchar(15), ClientEmail varchar(20), ClientPhone varchar(11), ClientState varchar(20), ClientCountry varchar(20), lawyerID INT NOT NULL, CONSTRAINT ClientID_pk PRIMARY KEY (ClientID),

CONSTRAINT lawyerID_fk FOREIGN KEY (lawyerID) REFERENCES Lawyers (lawyerID));

CREATE TABLE Services ( ServiceID INT, CaseType varchar(255), CaseHours INT, CaseTotal INT, ClientID INT, CONSTRAINT ServiceID_pk PRIMARY KEY (ServiceID),

CONSTRAINT ClientID_fk FOREIGN KEY (ClientID) REFERENCES Client (ClientID));

insert into Lawyers values (123, 'Ally McBeal', 'McBeal@lawfirm.com','3013558295', 'Maryland', 'United States'), (456, 'Perry Mason', 'Mason@lawfirm.com', '3013558296', 'Maryland', 'United States'), (789, 'Atticus Finch', 'Atticus@lawfirm.com', '3013558297', 'Maryland', 'United States);

insert into Client values (500, 'John Doe','Doe@xxxxx.com','3013218295','Maryland','United States',123), (501, 'Jane Doe','Jdoes@xxxxx.com','3013218296','Maryland', 'United States',456), (502, 'Todd Suit','Todd@xxxxx.com','3013218297','Maryland', 'United States',789), (503, 'Steve Guilt','Steve@xxxxx.com','2023218298','Virginia', 'United States',789), (504, 'Paula Subpoena','paula@xxxxx.com','2023218299','Virginia','United States',123), (505, 'Chris Acquit','chris@xxxxx.com','2023218300','Virginia','United States',456);

insert into Services values (100, 'accident', '50', '50', '321'), (200, 'divorce', '100', '150', '654'), (300, 'tort', '40', '80', '987'), (400, 'accident', '30', '100', '123'), (500, 'divorce', '40', '180', '456'), (600, 'tort', '60', '120', '789');

Thank you in advance.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!