CSDN博客

img Beerium

4KastorForum论坛SQL

发表于2004/9/17 10:32:00  1251人阅读

48小时(按点击)
select top 20 * from [4k_forum_threads] where  datediff(hour,datecreated,getdate())<=48  order by hits desc

48小时(按回复)
select top 20 * from [4k_forum_threads] where  datediff(hour,datecreated,getdate())<=4
order by resplies desc

一周
datediff(day,datecreated,getdate())<=7

一月

datediff(day,datecreated,getdate())<=30

0 0

相关博文

我的热门文章

img
取 消
img