标签:varchar 获取 nbsp sel sele name date() lse select
1.普通获取
SELECT CONVERT( varchar(10),YEAR(GetDate()) )+‘年‘+ CONVERT( varchar(10),MONTH(GetDate())) +‘月‘
2.月不足两位添加0
SELECT DateName(year,GetDate()) +‘年‘+ DateName(month,GetDate()) +‘月‘
标签:varchar 获取 nbsp sel sele name date() lse select
原文地址:https://www.cnblogs.com/mass/p/11412223.html