欢迎投稿

今日深度:

MySQL更改数据库表的存储引擎,mysql数据库

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'


www.htsjk.Com true http://www.htsjk.com/shujukunews/7786.html NewsArticle 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 N...
评论暂时关闭