Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Error #1064 MySQL Something is wrong in your syntax near '' accesslogh '

I got this MySQL error 1064:

# 1064 - Something is wrong in your syntax near '' accesslogh '(
id INT (30) PRIMARY KEY AUTO_INCREMENT NOT NULL,
nam ... 'on line 1

When i ran

CREATE TABLE 'accesslogh' (
id INT(30) PRIMARY KEY AUTO_INCREMENT NOT NULL, 
name VARCHAR(255), 
result VARCHAR(255), 
type VARCHAR(255), 
code VARCHAR(255), 
epoch INT(30), 
timestamp DATE DEFAULT CURRENT_TIMESTAMP);

I know it is a syntax error but I have tried to solve it following the correct theory but I can’t solve it. Help me pls.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Remove quotes around table name.

CREATE TABLE accesslogh (
id INT(30) PRIMARY KEY AUTO_INCREMENT NOT NULL, 
name VARCHAR(255), 
result VARCHAR(255), 
type VARCHAR(255), 
code VARCHAR(255), 
epoch INT(30), 
timestamp DATE DEFAULT CURRENT_TIMESTAMP);
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading