txtsql="select count(*) from seekfor where datediff(day,sf_date,getdate())=0"
txtsql="select count(*) from seekfor where sf_date>=convert(char(10),getdate(),120) and sf_date<convert(char(10),getdate()+1,120)"
这两句都是查询当天数据量的
由于在字段上使用了函数,第一句效率要低些.
txtsql="select count(*) from seekfor where datediff(day,sf_date,getdate())=0"
txtsql="select count(*) from seekfor where sf_date>=convert(char(10),getdate(),120) and sf_date<convert(char(10),getdate()+1,120)"
这两句都是查询当天数据量的
由于在字段上使用了函数,第一句效率要低些.
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
- 评论:(0)
发表评论 点击这里获取该日志的TrackBack引用地址