title: How to check if a table already exists in the database by using MySQL?
body: <p>Now I am using something like:</p>
  
  <pre><code>dbResult = dbStatement.executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '[e2]' AND table_name = '[emp101_messages]'");
  while(dbResult.next())
  {
      int value = -1;
      value= dbResult.getInt(1);
      System.out.println(value + " table count");
  }
  </code></pre>
  
  <p>Is this correct way to check if a table exists in a database?</p>