- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Using “TYPE = InnoDB” in MySQL throws an exception?
152 Lectures 16 hours
87 Lectures 5.5 hours
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)
- 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?
- SAP UI5 application throws an error while using Tree map
- 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?
- Can we change an exception of a method with throws clause from unchecked to checked while overriding it in java?
- How to convert MyISAM to InnoDB storage engine in MySQL?
- How do I know if a MySQL table is using myISAM or InnoDB Engine?