zoukankan      html  css  js  c++  java
  • MySQL Workbench导出Model提示['ERROR 1064 (42000): You have an error in your SQL syntax....syntax to use near 'VISIBLE']

    CREATE TABLE IF NOT EXISTS `pihealth`.`warning_events` (
      `wid` INT NOT NULL AUTO_INCREMENT,
      `wtime` DATETIME NOT NULL,
      `wip` VARCHAR(20) NOT NULL,
      `wtype` INT(5) NOT NULL,
      `wdetails` VARCHAR(255) NULL,
      PRIMARY KEY (`wid`),
      UNIQUE INDEX `wid_UNIQUE` (`wid` ASC) VISIBLE)
    ENGINE = InnoDB;

    ERROR 1064 (42000): 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)
    ENGINE = InnoDB' at line 8

    !!!!注意:索引VISIBLE 在MySQL8之后才支持

    我查看了自己的MySQL version

    1 mysql --version
    2 mysql  Ver 14.14 Distrib 5.7.21, for osx10.13 (x86_64) using  EditLine wrapper

    所以我的MySQL是不支持VISIBLE,把VISIBLE删除后在MySQL中执行则没有报错。

    若要以后建表不产生VISIBLE:

    MySQL Workbench->Preferences->Modeling->MySQL->Default Target MySQL Version:(这里填写自己的MySQL Version 5.7.21)

  • 相关阅读:
    stl(8)常见的算法
    stl(7)几种常见的迭代器
    stl(6)deque容器
    pre_exam_exercise1
    全为1时计算个数,出现0返回0
    COMP9021--7.18
    lecture 5 Basics of Map Algebra
    COMP9021--7.15
    Lecture 4补充
    COMP9021--7.4
  • 原文地址:https://www.cnblogs.com/Mendy/p/10572049.html
Copyright © 2011-2022 走看看