Dolf
Dolf

Reputation: 134

Syntax error in MySQL statement, unhelpful error message

I have a MySQL server and I am trying to use

INSERT INTO servers (ip, version, motd, players, plugins, time)
VALUES ('--.---.---.--', '1.13.2', 'redacted', '0', '1', NOW())
ON DUPLICATE KEY UPDATE;

to insert data, but this error message popped up:

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 '' at line 1

I tried this query again on LibreOffice Base and these messages popped up:

SQL Status: HY000
Error code: 1000
Syntax error in SQL statement

SQL Status: HY000
Error code: 1000
syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE

Any help?

Upvotes: 0

Views: 116

Answers (1)

Dolf
Dolf

Reputation: 134

Missing statement after on duplicate update

Upvotes: 1

Related Questions