SQL Server 中讀取當前年月
SQL Server 中讀取當前年月1、讀取當前年月:select convert(char(7),getdate(),20);
2、讀取數據庫中列的年月: select convert(char(7),[Date]{此為列名},20)
3、讀取當前月份的前兩個月份:
select convert(char(7),DateAdd("m" , -2 , getdate()),20)
最後更新:2017-04-03 08:26:15