MySQL Forums
Forum List  »  Newbie

ERROR 1064 You have an error in your SQL syntax
Posted by: Tim Hunter
Date: February 21, 2017 11:04AM

I am getting the following error when trying to create a table:
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 '-> `id` INT NOT NULL AUTO_INCREMENT,
-> `name` VARCHAR(50) NOT NULL,
-> PRIMARY ' at line 1

Here is what I am typing in:
CREATE TABLE `virtual_domains` (
-> `id` INT NOT NULL AUTO_INCREMENT,
-> `name` VARCHAR(50) NOT NULL,
-> PRIMARY KEY (`id`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I am new to this, so any help would truly be appreciated. Thanks!

Options: ReplyQuote


Subject
Written By
Posted
ERROR 1064 You have an error in your SQL syntax
February 21, 2017 11:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.