标签:
create table marklist
(
Name varchar(10),
Course varchar(10),
Mark float
)
insert into marklist(name,course,mark) values(‘张三‘,‘数学‘,75);
insert into marklist(name,course,mark) values(‘李四‘,‘语文‘,76);
insert into marklist(name,course,mark) values(‘李四‘,‘数学‘,75);
insert into marklist(name,course,mark) values(‘王五‘,‘英语‘,100);
insert into marklist(name,course,mark) values(‘王五‘,‘语文‘,81);
1 中: select distinct name from marklist where name not in(select name from marklist where mark < 80)
2: select name from marklist group by name having min(mark) > 80
标签:
原文地址:http://www.cnblogs.com/sunteng-change-control/p/4353015.html