Question
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 '`DatesDropped` DATE NULL
`ReasonDropped` VARCHAR(200) NULL
PRIMARY KEY (`Pat' at line 6
SQL Code:
-- -----------------------------------------------------
-- Table `mydb`.`droppedPatients`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `mydb`.`droppedPatients` (
`PatientKey` INT(11) NOT NULL
`DatesDropped` DATE NULL
`ReasonDropped` VARCHAR(200) NULL
PRIMARY KEY (`PatientKey`)
CONSTRAINT `fk_Patients_DroppedPatients`
FOREIGN KEY ()
REFERENCES `mydb`.`Patients` ()
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL script execution finished: statements: 7 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started