먼저 테이블을 생성하겠습니다 -
mysql> create table DemoTable1982 ( StudentId int , StudentName varchar(20), StudentAge int ); Query OK, 0 rows affected (0.00 sec)
테이블 엔진 유형을 확인해보자 -
mysql> show create table DemoTable1982;
이것은 다음과 같은 출력을 생성합니다 -
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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)
다음은 innoDB에서 MyISAM으로 테이블 엔진을 변경하는 쿼리입니다 -
mysql> alter table DemoTable1982 ENGINE='MyISAM'; Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0
이제 테이블 엔진 유형을 확인합시다 -
mysql> show create table DemoTable1982;
이것은 다음과 같은 출력을 생성합니다 -
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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)