导航

一句简单的SQL

Posted on 2011-04-15 19:00  口渴的火麒麟  阅读(428)  评论(0编辑  收藏  举报

insert into Table2(Id,Name,Score,Memo)
(
select Id,Name,Score,Memo from Table1 where id not in
(select id from Table1 a where score<(select max(score) from Table1 b where a.name=b.name))
)

题目就不写了  呵呵