Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MySQL Workbench Executing Script on Server -------------------------------------------------------------------------------- Server type: MySQL Server version: 8.0 - MySQL Community Server(GPL) MySQL Workbench 8.0 CE --------------------------------------------------------------------------------- Please correct the

MySQL Workbench Executing Script on Server

--------------------------------------------------------------------------------

Server type: MySQL

Server version: 8.0 - MySQL Community Server(GPL)

MySQL Workbench 8.0 CE

---------------------------------------------------------------------------------

Please correct the syntax errors in the log below

----------------------------------------------------------------------------------

Executing SQL script in server

ERROR: Error 1064: 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 ''ACTION')

ENGINE = InnoDB' at line 17

SQL Code:

-- -----------------------------------------------------

-- Table `mydb`.`Patients`

-- -----------------------------------------------------

CREATE TABLE IF NOT EXISTS `mydb`.`Patients` (

`PatientKey` INT(11) NOT NULL,

`FirstName` VARCHAR(45) NULL,

`MiddleName` VARCHAR(45) NULL,

`LastName` VARCHAR(45) NULL,

`PhoneNumber` VARCHAR(20) NULL,

`doctors_DoctorKey` INT(11) NOT NULL,

PRIMARY KEY (`PatientKey`),

INDEX `fk_Patients_doctors1_idx` (`doctors_DoctorKey` ASC) VISIBLE,

CONSTRAINT `fk_Patients_doctors1`

FOREIGN KEY (`doctors_DoctorKey`)

REFERENCES `mydb`.`doctors` (`DoctorKey`)

ON DELETE NO ACTION

ON UPDATE NO 'ACTION')

ENGINE = InnoDB

SQL script execution finished: statements: 6 succeeded, 1 failed

Fetching back view definitions in final form.

Nothing to fetch

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

where can i check for plagiarism

Answered: 1 week ago

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago

Question

Why does the location of individual visuals on a dashboard matter?

Answered: 1 week ago