关于SQL查询(一个表中有多个时间记要,只显示最后一次)

关于SQL查询(一个表中有多个时间记录,只显示最后一次)
用的是sql server 2008 
------解决方案--------------------
select top 1 *
from tab
order by 时间字段 desc

------解决方案--------------------
select  * from tb a
where not exists(select 1 from tb where date>a.date)

------解决方案--------------------
select a.* from tablename a 
where a.id in(select tablename.id from tablename where date>a.date group by tablename.id)

------解决方案--------------------
"select top 1 *
from tab
where year(时间字段)=year('"& txt.text & "') and month(时间字段)=month('" &txt.text &"' order by 时间字段 desc "