2005-6的形式Select Rtrim(Year(GetDate()))+'-'+Rtrim(Month(GetDate()))
如果 2005-06 这样的形式也可以满足你的要求的话,可以简写为Select Convert(Varchar(7),GetDate(),120)