title: Oracle PL/SQL previous year and month
body: <p>I need to write a script in pl/sql where I get the previous period. Period in the accounting system is defined as YYYYMM i.e for this month the current period would be 201304 and previous months period  would be 201303. </p>
  
  <p>For one of my functions a period is  passed I need to get the previous period.
  So for example if the period that is passed is 201301 then the query needs to return 201212</p>