title: How to write a like query in HQL
body: <p>I want to perform search for a particular string that is starting with a particular alphabet.</p>
  <p>So, for example if the starting alphabet is <code>'A'</code> then it should produce a result which will contain all the strings with alphabet <code>'A'</code>.</p>
  <p>How do I achieve this ?</p>
  <p>My query is as shown below:</p>
  <pre><code>Query qry = session.createQuery(&quot;From RegistrationBean as rb where rb.&quot;+searchCriteria+&quot;  like %?%&quot;);
  qry.setString(0,searchField);
  </code></pre>