时间:2021-07-01 10:21:17 帮助过:7人阅读
//找出各科最高成绩
create table gradeMax(
id int primary key auto_increment,
name varchar(20),
subject varchar(20),
grade int
);
insert into gradeMax(name ,subject ,grade ) values
(‘小点‘,‘语文‘,100),
(‘小黑‘,‘数学‘,100),
(‘小军‘,‘英语‘,100),
(‘小王‘,‘语文‘,88),
(‘小憋‘,‘数学‘,99),
(‘小丽‘,‘英语‘,89);
select * from gradeMax
where GRADE =(select max(grade) from gradeMax where name=name);
mySQL--找出各科最高成绩
标签:arch 成绩 key com value alt sel int har