语句如下:
1 --查询表中某列相同值的最近记录
2 SELECT * FROM TbName a
3 WHERE NOT EXISTS
4 (
5 SELECT 1 FROM TbName WHERE ColumnName=a.ColumnName and CreateTime>a.CreateTime
6 )
语句如下:
1 --查询表中某列相同值的最近记录
2 SELECT * FROM TbName a
3 WHERE NOT EXISTS
4 (
5 SELECT 1 FROM TbName WHERE ColumnName=a.ColumnName and CreateTime>a.CreateTime
6 )