- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Fix MySQL Database Error #1064?
The Database Error #1064 may occur due to incorrect syntax. For example, let’s say we are creating the below table −
mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100), UserAge int, UserAddress varchar(200), UserCountryName varchar(100) , isMarried boolean, );
This will produce the following output i.e. error −
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 10
To get rid of the above error, you need to remove last comma(,). The query is as follows to remove the error −
mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100), UserAge int, UserAddress varchar(200), UserCountryName varchar(100), isMarried boolean ); Query OK, 0 rows affected (1.04 sec)
- Related Articles
- Fix ERROR 1064 (42000) while creating a database in MySQL?
- Fix MySQL Error #1064 - You have an error in your SQL syntax… near 'TYPE=MyISAM?
- Resolve MySQL ERROR 1064 (42000): You have an error in your syntax?
- Fix MySQL ERROR 1064 (42000) check the manual that corresponds to your MySQL server version for the right syntax to use near ')'
- MySQL Error - #1046 - No database selected
- How to correctly use INSERT INTO … SELECT in MySQL to avoid Error 1064?
- Fix Error with TYPE=HEAP for temporary tables in MySQL?
- Fix Drop table view #1051 unknown table error in MySQL
- Fix error in MySQL “select ClientId,ClientName,ClientAge, from tablename”
- Fix: ERROR 1396 (HY000): Operation CREATE USER failed in MySQL?
- ERROR 1064 (42000): You have an error in your SQL syntax at zero fill column?
- Fix Error in MySQL syntax while creating a table column with name “index”?
- Why the #1054 - Unknown column error occurs in MySQL and how to fix it?
- Resolve Unknown database in JDBC error with Java-MySQL?\n
- Fix Connectivity error in Java MySQL connection for connector to be set to class path?

Advertisements