- 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
Resolve MySQL ERROR 1064 (42000): You have an error in your syntax?
This error occurs if let’s say you used var_char instead of varchar type. To remove this type of error, use, for example, varchar(100) instead of var_char(100).
Let us now see how this error occurs −
mysql> create table removeErrorDemo -> ( -> StudentId int, -> StudentName var_char(50) -> );
The following is the output displaying the 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 'var_char(50) )' at line 4
Now let us remove the error. Here is the query to remove error 1064 (42000) −
mysql> create table removeErrorDemo -> ( -> StudentId int, -> StudentName varchar(100) -> ); Query OK, 0 rows affected (1.72 sec)
Above, we have set varchar correctly, therefore no error will occur.
- Related Articles
- ERROR 1064 (42000): You have an error in your SQL syntax at zero fill column?
- 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?
- Fix MySQL Error #1064 - You have an error in your SQL syntax… near 'TYPE=MyISAM?
- How to resolve the MySQL error “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?”
- Resolve ERROR 1064 (42000) that occurred after using varchar (without providing the size)
- Fix ERROR 1064 (42000) while creating a database in MySQL?
- Fix MySQL ERROR 1064 (42000) check the manual that corresponds to your MySQL server version for the right syntax to use near ')'
- 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 Syntax error near “ORDER BY order DESC” in MySQL?
- Fix MySQL Database Error #1064?
- Declare syntax error in MySQL Workbench?
- How to resolve the ERROR 1115 (42000): Unknown character set: 'utf8mb4'?
- Resolve an error whenever multiple rows are returned in MySQL Benchmark?
- Resolve the MySQL error 'TYPE=MyISAM'?
- Resolve Unknown database in JDBC error with Java-MySQL?

Advertisements