取指定月份的天数

select day(dateadd(dd,-1,convert(char(7),dateadd(mm,1,'2008-2-1'),120)+ '-01 '))

原文地址:https://www.cnblogs.com/amylis_chen/p/2145318.html