
- 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 - You have an error in your SQL syntax… near 'TYPE=MyISAM?
This error occurs when we use TYPE for ENGINE NAME. The error is as follows −
mysql> create table DemoTable1836 ( ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientName varchar(20) )Type=MyISAM AUTO_INCREMENT=1; 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 'Type=MyISAM AUTO_INCREMENT=1' at line 5
Now, in MySQL 8, you can use ENGINE instead of Type. Let us first create a table −
mysql> create table DemoTable1836 ( ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientName varchar(20) )ENGINE=MyISAM AUTO_INCREMENT=1; Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1836(ClientName) values('Chris'); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1836(ClientName) values('David'); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1836(ClientName) values('Mike'); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1836(ClientName) values('Sam'); Query OK, 1 row affected (0.00 sec)
Display all records from the table using select statement −
mysql> select * from DemoTable1836;
This will produce the following output −
+----------+------------+ | ClientId | ClientName | +----------+------------+ | 1 | Chris | | 2 | David | | 3 | Mike | | 4 | Sam | +----------+------------+ 4 rows in set (0.00 sec)
- Related Articles
- Resolve MySQL ERROR 1064 (42000): You have an error in your syntax?
- 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… ”?
- ERROR 1064 (42000): You have an error in your SQL syntax at zero fill column?
- 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 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?
- Resolve the MySQL error 'TYPE=MyISAM'?
- Resolve Syntax error near “ORDER BY order DESC” in MySQL?
- Fix MySQL ERROR 1064 (42000) check the manual that corresponds to your MySQL server version for the right syntax to use near ')'
- Fix Error with TYPE=HEAP for temporary tables in MySQL?
- Fix Error in MySQL syntax while creating a table column with name “index”?
- Fix MySQL Database Error #1064?
- Declare syntax error in MySQL Workbench?
- Fix ERROR 1064 (42000) while creating a database in MySQL?
- Fix Drop table view #1051 unknown table error in MySQL
- Fix error in MySQL “select ClientId,ClientName,ClientAge, from tablename”

Advertisements