
- 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
Using âTYPE = InnoDBâ in MySQL throws an exception?
You can use ENGINE = InnoDB in place of TYPE = InnoDB, since the usage of TYPE became obsolete in MySQL version 5.1.
The version we are using for our example is MySQL version 8.0.12. Let us check the MySQL version. The query is as follows −
mysql> select version();
The following is the output −
+-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.00 sec)
Here is the example of TYPE = InnoDB. Error is visible in MySQL 8 −
mysql> create table Product_Information -> ( -> ProductId int, -> ProductName varchar(10), -> ProductDeliveryDate datetime -> )"TYPE = InnoDB"; 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 = InnoDB"' at line 6
Now use ENGINE in place of TYPE. Here is an example of ENGINE −
mysql> create table Product_Information -> ( -> ProductId int, -> ProductName varchar(10), -> ProductDeliveryDate datetime -> )ENGINE = InnoDB; Query OK, 0 rows affected (0.73 sec)
- Related Articles
- Is it possible to throw exception without using "throws Exception" in java?
- Instantiation of Export Options throws an Exception in SAP Crystal Report
- How do you test that a Python function throws an exception?
- MyISAM versus InnoDB in MySQL?
- Guidelines to follow in while overriding a method that throws an exception in java?
- Is INNODB enabled by default in MySQL?
- What are the rules need to follow when overriding a method that throws an exception in Java?
- Converting table from MyISAM to INNODB in MySQL?
- How can I see global locks in MySQL (innodb)?
- How can I install or enable innoDB in MySQL?
- MySQL - changing table engine from innoDB to MyISAM?
- How to convert MyISAM to InnoDB storage engine in MySQL?
- Can we change an exception of a method with throws clause from unchecked to checked while overriding it in java?
- How do I know if a MySQL table is using myISAM or InnoDB Engine?
- SAP UI5 application throws an error while using Tree map

Advertisements