MySQL更改數據庫表的存儲引擎
1、查看表的原存儲引擎
show create table user;
'user', 'CREATE TABLE `user` (\n `id` int(11) NOT NULL DEFAULT \'0\',\n `num` int(8) DEFAULT NULL,\n `name` varchar(20) DEFAULT NULL,\n `sex` varchar(10) DEFAULT NULL,\n `age` int(3) DEFAULT NULL,\n `phone` varchar(11) DEFAULT NULL,\n `address` varchar(100) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8'
alter table user engine=MyISAM;
'user', 'CREATE TABLE `user` (\n `id` int(11) NOT NULL DEFAULT \'0\',\n `num` int(8) DEFAULT NULL,\n `name` varchar(20) DEFAULT NULL,\n `sex` varchar(10) DEFAULT NULL,\n `age` int(3) DEFAULT NULL,\n `phone` varchar(11) DEFAULT NULL,\n `address` varchar(100) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8'