title: DROP a table using Spring Boot
body: <p>I want execute <code>drop</code> table query on my database using spring JPA (Database- <code>Postgres</code>)</p>
  <p>This is my code:</p>
  <pre><code>public void executeDropTable(String tableName){
  
      String query = &quot;DROP TABLE IF EXISTS :tableName&quot;;
  
      entityManager.createQuery(query)
              .setParameter(&quot;tableName&quot;, tableName)
              .executeUpdate();
  
  }
  </code></pre>
  <p>But in IntelliJ shows error as <code>'DROP' unexpected</code> on a query string</p>
  <p><a href="https://i.stack.imgur.com/qIn9S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qIn9S.png" alt="enter image description here" /></a></p>