CREATE TABLE `grades` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`student_id` int(20) NOT NULL,
`subject` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`grades` varchar(20) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
insert into `grades`(`id`,`student_id`,`subject`,`grades`) values (1,1,'語文','80'),(2,1,'數(shù)學(xué)','89'),(3,2,'語文','90');
CREATE TABLE `student` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
insert into `student`(`id`,`name`) values (1,'xiaoming'),(2,'xiaohong'),(3,'xiaobai');
以上所述是小編給大家介紹的mysql max 與 where 間的執(zhí)行問題小結(jié),希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!