title: Truncate once in a year
body: <p>Suppose I have a table which contains a Date field and it contains values by CURDATE() Is there a way to truncate it once in the beginning of every year only once</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS tableA(
  id INT(50) PRIMARY KEY,
  modified_on DATE
  }
  
  INSERT INTO tableA VALUES(1,CURDATE())
  </code></pre>
  
  <p>How to truncate it at the beginning of every year once once
  Something like </p>
  
  <pre><code>TRUNCATE TABLE tableA
       CASE WHEN (YEAR(tableA.modified_date) != YEAR(CURDATE()))
  </code></pre>
  
  <p>But it is not working</p>