正向工程 MySQL 工作台错误 1064

Forward Engineering MySQL Workbench Error 1064(正向工程 MySQL 工作台错误 1064)
本文介绍了正向工程 MySQL 工作台错误 1064的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个 EER 图,我正在尝试对其进行转发工程,但我收到此错误,但我找不到错误.

I made a EER diagram and I am trying to Forward Engineer it but I get this error and I can't find the mistake.

在服务器中执行 SQL 脚本 ERROR: Error 1064: You have an error in你的 SQL 语法;检查与您的 MariaDB 对应的手册在 'INDEX 附近使用正确语法的服务器版本fk_User_Wallets1_idx (Wallets_idWallets ASC) VISIBLE, CONSTRAINT '在第 13 行

Executing SQL script in server ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX fk_User_Wallets1_idx (Wallets_idWallets ASC) VISIBLE, CONSTRAINT ' at line 13

SQL 代码:

        CREATE TABLE IF NOT EXISTS `mydb`.`User` (
          `idUser` INT NOT NULL AUTO_INCREMENT,
          `name` VARCHAR(45) NULL,
          `email` VARCHAR(45) NULL,
          `adress` VARCHAR(45) NULL,
          `password` VARCHAR(45) NULL,
          `saldo` INT NULL,
          `date_start` DATETIME NULL,
          `date_end` DATETIME NULL,
          `Rolls_idRolls` INT NOT NULL,
          `Wallets_idWallets` INT NOT NULL,
          PRIMARY KEY (`idUser`, `Rolls_idRolls`, `Wallets_idWallets`),
          INDEX `fk_User_Rolls1_idx` (`Rolls_idRolls` ASC) VISIBLE,
          INDEX `fk_User_Wallets1_idx` (`Wallets_idWallets` ASC) VISIBLE,
          CONSTRAINT `fk_User_Rolls1`
            FOREIGN KEY (`Rolls_idRolls`)
            REFERENCES `mydb`.`Rolls` (`idRolls`)
            ON DELETE NO ACTION
            ON UPDATE NO ACTION,
          CONSTRAINT `fk_User_Wallets1`
            FOREIGN KEY (`Wallets_idWallets`)
            REFERENCES `mydb`.`Wallets` (`idWallets`)
            ON DELETE NO ACTION
            ON UPDATE NO ACTION)
        ENGINE = InnoDB

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

Fetching back view definitions in final form.
Nothing to fetch

推荐答案

可以加引擎吗

ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

这篇关于正向工程 MySQL 工作台错误 1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)