Home > Net >  What's wrong with the syntax of this create table query?
What's wrong with the syntax of this create table query?

Time:04-21

I've tried changing the table name to match and 'matches' but I still get the same 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' (r1 VARCHAR(5), r2 VARCHAR(5), r3 VARCHAR(5), r4 VARCHAR(5), r5 VARCH...' at line 1
CREATE TABLE 'match' (r1 VARCHAR(5), r2 VARCHAR(5), r3 VARCHAR(5), r4 VARCHAR(5), r5 VARCHAR(5));

CodePudding user response:

match is a reserved word, use matches again without the single quotes.

CREATE TABLE matches (r1 VARCHAR(5), r2 VARCHAR(5), r3 VARCHAR(5), r4 VARCHAR(5), r5 VARCHAR(5));

hope this helps.

  • Related