MySQL Forums
Forum List  »  MySQL Query Browser

Error 1064 - When Trying To Run 2 Create in one hit
Posted by: Sandeep shah
Date: July 18, 2005 08:21PM

Hi There,

I am getting error 1064 with following text:

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 ';
CREATE TABLE departments(
department_code int(11) NOT NULL auto_increment,
' at line 5


I am trying to run following two create statement in Query Browser in one hit..

CREATE TABLE groups(user_group char(3) NOT NULL default '',
user_group_desc varchar(100) NOT NULL default '',
created_by varchar(10) NOT NULL default '',
created_date timestamp,
PRIMARY KEY (user_group));

CREATE TABLE departments(
department_code int(11) NOT NULL auto_increment,
department_name varchar(40) NOT NULL default '',
active int(11) default '1',
created_by varchar(10) NOT NULL default '',
created_date timestamp,PRIMARY KEY (department_code));

If I run them one by one it works fine.

I need to run them in one hit because I all my create statements in one sql file that I use to create my database.

Please help!!



Edited 1 time(s). Last edit at 07/18/2005 09:16PM by Sandeep shah.

Options: ReplyQuote


Subject
Written By
Posted
Error 1064 - When Trying To Run 2 Create in one hit
July 18, 2005 08:21PM


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.