select * from yourtable where rowid in ( select max(rowid) from yourtable group by id)

解决方案 »

  1.   

    select distinct id from table_name
      

  2.   

    select * from table_name 
    where rowid in ( select min(rowid) from table_name group by id)
      

  3.   

    select * from table_name where id in ( select distinct id from table_name);
      

  4.   

    volin(volin)可能理解得不对啊。
    其他各位的解答不错,主要是应用了rowid,请问这个字段是oracle专有的吗?其具体的含义是什么?
      

  5.   

    select * from yourtable where rowid in ( select max(rowid) from yourtable group by id) and rownum<51