SQL Error on MySQL query

Hi All
I am importing the Mysql schema for SNORT but the following query is causing errors

CREATE TABLE schema ( vseq        INT      UNSIGNED NOT NULL,
                      ctime       DATETIME NOT NULL,
                      PRIMARY KEY (vseq));


ERROR 1064 (42000) at line 23: 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 'schema ( vseq        INT      UNSIGNED NOT NULL,
                      ctime    ' at line 1
LVL 19
http:// thevpn.guruAsked:
Who is Participating?
 
Aleksandar BradarićSoftware DeveloperCommented:
Or enclose the table name in backticks, like:
---
CREATE TABLE `schema` ...
---
0
 
BioICommented:
you should change the table-name.
Schema is a "protected" word in mysql
change schema in test, and that should work...
0
 
http:// thevpn.guruAuthor Commented:
Thx for both of you..I will accept leannonn's answer mainly because I can not rename the database name because SNORT needs it as is. Thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.