我在一个表里面,里面有订单,这个表里面的订单每天都在增加,我现在想写一段程序来实现,计算今天的订单的数量.统计今天的订单数量.
这样怎么实现.
------解决方案--------------------
- SQL code
select count(*) from yourdb where datediff(day,dbdate,getdate())=0
select count(*) from yourdb where datediff(day,dbdate,getdate())=0