
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Fix MySQL ERROR 1064 (42000) check the manual that corresponds to your MySQL server version for the right syntax to use near ')'
This error may occur if you have used an incorrect syntax. Let’s say the following is the create table statement −
mysql> create table DemoTable1492 -> ( -> timestamp TIMESTAMP, -> event int, -> ); 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 5
You need to remove extra comma above after the event column to fix. Let us first create a −
mysql> create table DemoTable1492 -> ( -> timestamp TIMESTAMP, -> event int -> ); Query OK, 0 rows affected (0.44 sec)
Insert some records in the table using insert −
mysql> insert into DemoTable1492 values(now(),101); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable1492 values(now()+interval 3 month,102); Query OK, 1 row affected (0.14 sec)
Display all records from the table using select command −
mysql> select * from DemoTable1492;
This will produce the following output −
+---------------------+-------+ | timestamp | event | +---------------------+-------+ | 2019-10-06 10:56:53 | 101 | | 2020-01-06 10:57:07 | 102 | +---------------------+-------+ 2 rows in set (0.00 sec)
- Related Articles
- How to fix error “You have an error in your syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near… ”?
- Resolve usage of quotes 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?
- How to resolve the MySQL error “You have an error in your SQL syntax; check the manual\nthat corresponds to your MySQL server version for the right syntax to use near?”
- Resolve MySQL ERROR 1064 (42000): You have an error in your syntax?
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=10'?
- Fix MySQL Error #1064 - You have an error in your SQL syntax… near 'TYPE=MyISAM?
- Fix ERROR 1064 (42000) while creating a database in MySQL?
- Fix MySQL Database Error #1064?
- ERROR 1064 (42000): You have an error in your SQL syntax at zero fill column?
- Resolve ERROR 1064 (42000) that occurred after using varchar (without providing the size)
- How can I check the version of MySQL Server?
- Resolve Syntax error near “ORDER BY order DESC” in MySQL?
- How to correctly use INSERT INTO … SELECT in MySQL to avoid Error 1064?
- Fix Error in MySQL syntax while creating a table column with name “index”?
- How To Check MySQL Version

Advertisements