SQL如何取日期中的年月

select left(convert(varchar,getdate(),21),7)
select convert(varchar(7),getdate(),120)
year(time)+'-'+month(time)
原文地址:https://www.cnblogs.com/monkeyfather/p/3892795.html