MySQL更改資料庫表的儲存引擎,mysql資料庫

來源:互聯網
上載者:User

MySQL更改資料庫表的儲存引擎,mysql資料庫

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'

2、修改儲存引擎

alter table user engine=MyISAM;

3、查看修改後的儲存引擎

'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'


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.