title: Why does my HQL query return "must begin with select or from"?
body: <p>I am trying to execute an HQL delete query, but it is giving an exception: "Query must begin with select or from".</p>
  
  <pre><code> transaction = session.beginTransaction();
  Query query=session.createQuery("DELETE FROM category where categoryid = :categoryid");
              query.setParameter("categoryid", id);
              int result=query.executeUpdate();
          transaction.commit();
  </code></pre>