title: how to select only first 10 characters from sql column with Hibernate Criteria
body: <p>I have a column in mysql  "description "
  which value is like   "this is a description of some of the products we have the list of the products is big enough.." </p>
  
  <p>now i want to retrieve it from mysql in to java but only first 10 characters with hibernate criteria  </p>
  
  <p>from below i can get this above value from mysql ,but i just want to get only first 10 like ""this is a description of some of the products" not more than this </p>
  
  <p>any way of doing it in hibernate .</p>
  
  <pre><code>    Patients patients = null;
      session = sessionFactory.openSession();
      Criteria crit = session.createCriteria(Patients.class);
  
      List rsList = crit.list();
      for(Iterator it=rsList.iterator(); it.hasNext();)
      {
          patients = (Patients)it.next();
  </code></pre>
  
  <p>thanks</p>