请问sql查询有关问题,为每个objectGuid选出最新更新的两条记录

请教sql查询问题,为每个objectGuid选出最新更新的两条记录有一张表 table1 主要的字段如下:guid标识主键ob

请教sql查询问题,为每个objectGuid选出最新更新的两条记录
有一张表 table1 主要的字段如下:
guid 标识主键
objectGuid 所属对象 外键
updateTime 更新时间

现需要在这个表中为每一个objectGuid选出最新updateTime的两条记录

敬请赐教


[解决办法]

SQL code
select * from tb twhere updateTime in (select top 2 updateTime from tb where objectGuid =t.objectGuid  order by updateTime desc)