mysql之ENGINE
2020-11-05 本文已影响0人
sunland_0416
CREATE TABLE `tabname` (
`id` int NOT NULL AUTO_INCREMENT,
`id_pc` varchar(255) DEFAULT NULL COMMENT 'aaaaa',
`first` varchar(255) DEFAULT NULL COMMENT '第一个',
`second` varchar(255) DEFAULT NULL COMMENT '第二个',
`third` varchar(255) DEFAULT NULL COMMENT '第三个',
`num` int DEFAULT NULL COMMENT '值',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23055 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据表'
SHOW ENGINES; -- 提供的引擎
Engine | Support | Comment | Transactions | XA | Savepoints |
---|---|---|---|---|---|
FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
MyISAM | YES | MyISAM storage engine | NO | NO | NO |
MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
CSV | YES | CSV storage engine | NO | NO | NO |
ARCHIVE | YES | Archive storage engine | NO | NO | NO |