We all know how to create a table in MySQL. But have you ever given the Type of MySQL Engine while creating a Table?.
All we do is, write a CREATE TABLE statement to create a table, but it always takes the default engine, most of the time it would be MyISAM, some newer versions of MySQL having InnoDB as default engine.
Anyhow you can tell the MySQL to create the specific engine type while creating a table, see the demo query below:
1 2 3 4 5 |
CREATE TABLE employee ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, name VARCHAR(200), email VARCHAR(200) )ENGINE=MYISAM; |
All you have to do is give the ENGINE name after the query,
ENGINE=MYISAM;
or
ENGINE=INNODB;