摘要:
declare @num1 int --为符合条件的总行数 select @num1=COUNT(1) from cardInfo where openDate between @date1 and @date2 --@date1 和 @date2 为开始时间到结束时间,可以理解一个条件 while 阅读全文
posted @ 2016-08-18 20:14
wyd12138
阅读(870)
评论(0)
推荐(0)
摘要:
DATEADD(mm, DATEDIFF(mm,0,getdate()), 0) --返回本月第一天 dateadd(ms,-3,DATEADD(mm, DATEDIFF(m,0,getdate())+1, 0)) --返回本月最后一天 阅读全文
posted @ 2016-08-18 15:30
wyd12138
阅读(243)
评论(0)
推荐(0)