title: org.hibernate.hql.internal.ast.QuerySyntaxEx`ception: expecting OPEN, found 'from' near line 1, column
body: <p>I have a project in Spring Boot 1.5 with <code>mysql</code> database. I have 2 entity classes <code>BackupOTP</code> &amp; <code>OTP</code> and I want to copy data from <code>OTP</code> table to <code>BackupOTP</code> table using HQL. For that I have written this code.</p>
  <pre><code>Query query=session.createQuery(&quot;insert into BackupOTP from OTP where isExpired=:boolean&quot;);
  query.setBoolean(&quot;boolean&quot;, true);
  int i=query.executeUpdate();
  System.err.println(&quot;i = &quot;+i);
  </code></pre>
  <p>But I am experiecning the below exception:</p>
  <pre><code>org.hibernate.hql.internal.ast.QuerySyntaxException: 
  expecting OPEN, found 'from' near line 1, column 23 
  [insert into BackupOTP from com.altafjava.central.entity.OTP where isExpired=:boolean]
  </code></pre>
  <p>How to resolve this issue?</p>