create view v_name as
select * from tbname where rowid not in(
select max(rowid) from tbname group by name,sex);

解决方案 »

  1.   

    create view v_name as
    select * from t_name a where a.rowid > (select min(b.rowid)
    from t_name b
    where a.name=b.name and a.sex=b.sex)
      

  2.   

    to bzszp:为什么没有第2,4条记录
      

  3.   

    create view temp as
     select * from test where (select count(*) from test a where test.name=a.name and test.sex=a.sex)>1;
    对,他哪个漏记录!!
      

  4.   

    to dzhrg:好了,矛厕顿开!谢谢