declare @stYear int
declare @stMonth int
set @stYear =2009
set @stMonth =2
declare @startdate varchar(15),@stop varchar(15)
select @startdate= cast(@stYear as varchar(15)) +'-0'+ cast(@stMonth as varchar(15)) +'-01'
select @startdate, dateadd(day,-1,dateadd(month,1,@startdate))
posted on 2009-03-25 14:48
Werther 阅读(256)
评论(0) 编辑 收藏 所属分类:
15.SQL Server