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,'数学','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 间的执行问题小结,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!