where year(日期欄位) = @year and month(日期欄位) = @month 這樣也可以在SQL Server指定年月做為篩選條件
也可以使用 <pre class="c" name="code">convert(varchar(7...
MSSQL 可以參考 DATEPART