title: How to order by Month starting from a selected Month in SQL?
body: <p>I have a table with a Code and Description column. The Description column contains the months of the year in consecutive order, and the code is the month number (e.g. Code = 1, Description = January).</p>
  <p>I want to write a SQL query which takes the previous month (from the current month) and returns a table starting from that month and sorting months in ascending order (the previous month is August, so the table will start with August on row 1 with a code of 8 and next is September, 9 etc.)</p>
  <p>My code so far:</p>
  <pre><code>DECLARE @PreviousMonth INT = MONTH(DATEADD(mm, -1, GETDATE()))
  SELECT @PreviousMonth
  SELECT
       MonthNumber AS Code,
       MonthName AS Description
  FROM
      MonthName
  ORDER BY MONTH(DATEADD(mm, -1, GETDATE()))
  </code></pre>
  <p>So if the current month is September, August will be the previous month.</p>
  <p>Expected result (Code on the left, description on the right):</p>
  <pre><code>8 August
  9 September 
  10 October
  11 November
  12 December
  1 January
  2 February
  3 March
  4 April
  5 May
  6 June
  7 July
  </code></pre>