I created this using MySQL WorkBench
CREATE开发者_如何学C  TABLE IF NOT EXISTS `bakasura_new`.`cities` (
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(255) NOT NULL COMMENT 'City Name' ,
  `short_name` VARCHAR(255) NOT NULL COMMENT 'Short Name' ,
  `country_id` INT(11) UNSIGNED NOT NULL ,
  PRIMARY KEY (`id`) ,
  INDEX `fk_cities_countries` (`country_id` ASC) ,
ENGINE = InnoDB;
I am getting this error
MySQL said: Documentation
#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 '= InnoDB' at line 8
You have a dangling comma here:
INDEX `fk_cities_countries` (`country_id` ASC) ,
And you also have a missing parenthesis at the end:
CREATE  TABLE IF NOT EXISTS `bakasura_new`.`cities` (
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(255) NOT NULL COMMENT 'City Name' ,
  `short_name` VARCHAR(255) NOT NULL COMMENT 'Short Name' ,
  `country_id` INT(11) UNSIGNED NOT NULL ,
  PRIMARY KEY (`id`) ,
  INDEX `fk_cities_countries` (`country_id` ASC)
) ENGINE = InnoDB;
There is a ) missing at the end of the last )
INDEX `fk_cities_countries` (`country_id` ASC) )
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论