title: My Spring JPA queries do not work with H2
body: <p>This query below does not work and it generates me an exception</p>
  <pre><code>@Query(value = &quot;SELECT * FROM account WHERE account_no = ?1&quot;,
  nativeQuery = true)
  Account findByAccountNo(String accountNo);
  </code></pre>
  <pre><code> &quot;message&quot;: &quot;could not prepare statement; SQL [SELECT * FROM account WHERE account_no = ?]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement&quot;,
  </code></pre>
  <p>When I used the MySQL database, the query worked fine. But now that I am using the H2 database, it suddenly does not work. Why? How do I fix this?</p>