
- 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
MySQL - changing table engine from innoDB to MyISAM?
Let us first create a table −
mysql> create table DemoTable1982 ( StudentId int , StudentName varchar(20), StudentAge int ); Query OK, 0 rows affected (0.00 sec)
Let us check the table engine type -
mysql> show create table DemoTable1982;
This will produce the following output −
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DemoTable1982 | CREATE TABLE `demotable1982` (`StudentId` int(11) DEFAULT NULL, `StudentName` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `StudentAge` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
Here is the query to change table engine from innoDB to MyISAM −
mysql> alter table DemoTable1982 ENGINE='MyISAM'; Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0
Let us check the table engine type now −
mysql> show create table DemoTable1982;
This will produce the following output −
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DemoTable1982 | CREATE TABLE `demotable1982` ( `StudentId` int(11) DEFAULT NULL, `StudentName` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `StudentAge` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci | +---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
- Related Articles
- Converting table from MyISAM to INNODB in MySQL?
- How to convert MyISAM to InnoDB storage engine in MySQL?
- How do I know if a MySQL table is using myISAM or InnoDB Engine?
- How to create a MySQL table with MyISAM engine table?
- How to create a MySQL table with InnoDB engine table?
- MyISAM versus InnoDB in MySQL?
- When to use MyISAM and InnoDB?
- How to display all tables in MySQL with InnoDB storage engine?
- Can I use InnoDB and MyISAM tables in a single database in MySQL?
- While creating a MySQL table, how can I specify the storage engine of my choice rather than using the default storage engine InnoDB?
- How to change Table Engine in MySQL?
- How to update MySQL table storage engine
- How to display the Engine of a MySQL table?
- How to alter the database engine of a MySQL database table?
- Changing Column in MySQL from int to double?

Advertisements