日期:2014-05-17 浏览次数:20428 次
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