Menu

#4540 Syntax error for table create having a auto_increment column but not checked as primary key

Latest_Git
fixed
None
1
2014-09-24
2014-09-22
No

Hi

When we try to create a new table with a column that has checked auto_increment but has not been set to be primary key, we get the Error popup saying

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 ') ) ENGINE = InnoDB' at line 1

preview sql shows the query formed as:
CREATE TABLE ffs.memTable ( id INT(11) NOT NULL AUTO_INCREMENT , PRIMARY KEY () ) ENGINE = InnoDB;

Discussion

  • Marc Delisle

    Marc Delisle - 2014-09-24
    • assigned_to: Smita Kumari
     
  • Smita Kumari

    Smita Kumari - 2014-09-24
    • status: open --> fixed
    • Priority: 5 --> 1
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.