时间:2021-07-01 10:21:17 帮助过:14人阅读
Create Table CREATE TABLE `demo` ( `demoId` int(11) NOT NULL AUTO_INCREMENT, `class_id` int(11) DEFAULT NULL, PRIMARY KEY (`demoId`) ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 //2 录入测试数据 //3 查询 SELECT COUNT(class_id),class_id FROM demo GROUP BY class_id