select * from a x
where not exists (
select 1 from a
where  编号=a.编号
and 时间>a.时间
)

解决方案 »

  1.   

    or:select * from a x
    where 时间= (
    select max(时间) from a
    where  编号=a.编号
    )
      

  2.   

    or :select x.* from a x,(
    select 编号,max(时间) as 时间 from a
    group by 编号
    ) as y
    where x.编号=y.编号
    and x.时间=y.时间
      

  3.   

    select a.* from table a,(select 编号,max(时间) from table group by 编号)b where a.编号=b.编号
      

  4.   

    用SQL语句如何能查找到不同编号时间为最大值的记录信息呢?
    这个可能会有重复值!