Detect if a table existsTag(s): JDBC
Connection c = ... DatabaseMetaData dbm = c.getMetaData(); // check if "employee" table is there ResultSet tables = dbm.getTables(null, null, "employee", null); if (tables.next()) { // Table exists } else { // Table does not exist }
mail_outline
Send comment, question or suggestion to howto@rgagnon.com
Send comment, question or suggestion to howto@rgagnon.com