1.Select Code,Name from a,b where a.Code=b.Code and b.Course<>'Cl02'2.Select a.Code,a.Name,Max(b.grade) From a,b where a.Code=b.Code and b.Course='c2'

解决方案 »

  1.   

    select a.code,name from a join b on a.code=b.code where course<>'Cl02'select a.code,name from a表 as a join b表 as b on a.code=b.code where grade=(select max(grade) from b表 where course='C2' and code=a.code)
      

  2.   

    改正一下:select a.code,name from a join b on a.code=b.code where course<>'Cl02'select a.code,name from a表 as a join b表 as b on a.code=b.code where grade=(select max(grade) from b表 where course='C2')
      

  3.   


    1,select * from a where code not in (select code from b where course='C102')2,select * from a code in (select top 1 code from b where course='C2' order by grade desc)