Get latest updated records

前端 未结 5 1820
旧时难觅i
旧时难觅i 2020-12-22 03:00

I have an \"Observation\" table in SQL Server 2008. This table has a locationId column for a bunch of geographic locations, a few columns for observation details and a colum

5条回答
  •  情深已故
    2020-12-22 03:06

     select * from observation where date=(select max(date) from observation)
    

    or

    select top 1 * from observation order by date desc
    

提交回复
热议问题