5 个解决方案
#1
select * from tb t
where not exists
(select 1 from tb where t.id = id and t.date>date)
--把帖子转到技术区去
#2
select top 1 * from test order by [date] desc
#3
select top 1 * from test order by date desc
select * from test where date = (select max(date) from test)
#4
select top 1 * from tb order by [date] desc
#5
多谢各位
#1
select * from tb t
where not exists
(select 1 from tb where t.id = id and t.date>date)
--把帖子转到技术区去
#2
select top 1 * from test order by [date] desc
#3
select top 1 * from test order by date desc
select * from test where date = (select max(date) from test)
#4
select top 1 * from tb order by [date] desc
#5
多谢各位