例子一:

select getdate() as '当前时间',
    case month(getdate())
        when 9 then '9月份'
        when 10 then '10月份'
        else convert(varchar(50), month(getdate()))
    end

例子二:

select getdate() as '当前时间',
    case 
        when month(getdate()) = 9 then '9月份'
        when month(getdate()) = 10 then '10月份'
        else convert(varchar(50), month(getdate()))
    end

 

相关文章:

  • 2022-03-07
  • 2022-02-08
  • 2021-04-28
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
猜你喜欢
  • 2022-01-16
  • 2022-01-02
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2021-07-02
相关资源
相似解决方案