当试图对我的数据库模型进行正向工程时,我得到了下面的错误信息。我知道这个问题已经被回答过很多次了,我已经看了很多遍了,但是他们没有解决我的问题。只是为了不被标记,我会粘贴的问题,我作为参考使用的链接。下面我将把我的错误记录下来 log file
. 任何帮助都将不胜感激。
正向工程mysql工作台错误1064
mysql工作台输出错误1064中的正向工程
正向工程mysql工作台
错误1005 mysql workbench正向工程 SQL Workbench V.8.0.12
```
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 'VISIBLE,
INDEX id_Department_idx
(id_Department
ASC) VISIBLE,
CONSTRAINT' at line 12
SQL Code:
-- -----------------------------------------------------
-- Table hospitaldb
.Staff
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS hospitaldb
.Staff
(staff_id
INT NOT NULL,first_name
VARCHAR(45) NOT NULL,last_name
VARCHAR(45) NOT NULL,id_Department
INT NULL,title
VARCHAR(45) NULL,id_Hospital
INT NOT NULL,
PRIMARY KEY (staff_id
),
INDEX id_Hospital_idx
(id_Hospital
ASC) VISIBLE,
INDEX id_Department_idx
(id_Department
ASC) VISIBLE,
CONSTRAINT id_Hospital
FOREIGN KEY (id_Hospital
)
REFERENCES hospitaldb
.Hospital
(idHospital
)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT id_Department
FOREIGN KEY (id_Department
)
REFERENCES hospitaldb
.Hospital
(idHospital
)
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
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 'VISIBLE,
INDEX id_Department_idx
(id_Department
ASC) VISIBLE,
CONSTRAINT' at line 12
SQL Code:
-- -----------------------------------------------------
-- Table hospitaldb
.Staff
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS hospitaldb
.Staff
(staff_id
INT NOT NULL,first_name
VARCHAR(45) NOT NULL,last_name
VARCHAR(45) NOT NULL,id_Department
INT NULL,title
VARCHAR(45) NULL,id_Hospital
INT NOT NULL,
PRIMARY KEY (staff_id
),
INDEX id_Hospital_idx
(id_Hospital
ASC) VISIBLE,
INDEX id_Department_idx
(id_Department
ASC) VISIBLE,
CONSTRAINT id_Hospital
FOREIGN KEY (id_Hospital
)
REFERENCES hospitaldb
.Hospital
(idHospital
)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT id_Department
FOREIGN KEY (id_Department
)
REFERENCES hospitaldb
.Hospital
(idHospital
)
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
暂无答案!
目前还没有任何答案,快来回答吧!