SQL Server 中读取当前年月

  SQL Server 中读取当前年月
1、读取当前年月:select convert(char(7),getdate(),112);
2、读取数据库中列的年月: select convert(char(7),[Date]{此为列名},20)
3、读取当前月份的前两个月份:
      select convert(char(7),DateAdd ("m" , -2 , getdate()),20)
请使用浏览器的分享功能分享到微信等