Reputation: 5488
I want to create a table in MariaDB
CREATE TABLE IF NOT EXISTS match
(
a INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
b INT NOT NULL,
c INT NOT NULL,
d INT NOT NULL,
e INT NOT NULL,
f INT NOT NULL,
g VARCHAR(30)
)
but I got this error :
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match ( a INT AUTO_INCREMENT NOT NULL PRIMARY KEY, b INT NOT NULL, ' at line 1 `
What is the problem?
Upvotes: 0
Views: 983
Reputation: 336
From maria db:
Syntax
MATCH (col1,col2,...) AGAINST (expr [search_modifier])
This construction is declared in the main language's structure so you cannot use the keyword match
or any word that contains it.
Upvotes: 2
Reputation: 5840
Match
is a reserved word (match against
construction), so you cannot use it as table name. Check rule 18 here: https://mariadb.com/kb/en/sql-99/naming-rules/
Upvotes: 1