MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors
N.M.P.L. Company www.NearMePayday.Loan || 3-month (90 days)
Powered by MySQL
 

How to create innodb table in MySQL?

Can you help me to explain, how to create InnoDB table in MySQL?

Answer No: 186

MySQL provides CREATE TABLE statement to create tables into a database. CREATE TABLE statement has several options to set for the table. While creating a table we can use ENGINE or TYPE option to ask MySQL to create a table of any type available on the server. ENGINE or TYPE option works same, you can use any of them passing 'INNODB' value. Take following two examples:

CREATE TABLE buyers(
buyer_id INT UNSIGNED NOT NULL,
first_name CHAR(19) NOT NULL,
last_name CHAR(19) NOT NULL,
age SMALLINT NOT NULL,
post_code SMALLINT NOT NULL
) ENGINE=INNODB;

or

CREATE TABLE buyers(
buyer_id INT UNSIGNED NOT NULL,
first_name CHAR(19) NOT NULL,
last_name CHAR(19) NOT NULL,
age SMALLINT NOT NULL,
post_code SMALLINT NOT NULL
) TYPE=INNODB;

Related MySQL FAQs to the Above FAQ

When-should-we-use-innodb-engine When should we use innodb engine?

How-to-install-Innodb-Engine How to install Innodb Engine?

How-to-uninstall-Innodb-Engine How to uninstall Innodb Engine?

How-to-rename-a-database-with-full-Innodb-Tables How to rename a database with full Innodb Tables?

How-to-take-data-back-up-for-InnoDB-tables-like-copy-paste How to take data back up for InnoDB tables like copy paste?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: Wikipedia.org | Oracle.com | w3schools.com | www.php.net | Github.com

© 2021  www.mysqlfaqs.net
All rights reserved.