Question 1:Can you use a

15 查阅
Question 1:Can you use a batch SQL or store procedure to calculatingthe Number of Days in a Month

参考答案:

正确答案:
Answer 1:找出当月的天数
select datepart(dd,dateadd(dd,-1,dateadd(mm,1,cast(cast(year(getdate()) as
varchar)+'-'+cast(month(getdate()) as varchar)+'-01' as datetime))))