title: Truncate the table using hibernate criteria API
body: <p>I wanted to delete all the records in a table using hibernate criteria, like </p>
  
  <pre><code>Criteria criteria = &lt;session&gt;.createCriteria("table name here");
  criteria.(&lt;.....&gt;);
  </code></pre>
  
  <p>I am getting lots of help as below</p>
  
  <pre><code>session.createSQLQuery("truncate table MyTable").executeUpdate();
  </code></pre>
  
  <p>Is there any way to truncate using Criteria class, or any other class i can use Please let me know</p>