Java Utililty Methods SQL Table Drop

List of utility methods to do SQL Table Drop

Description

The list of methods to do SQL Table Drop are organized into topic(s).

Method

voiddropTable(Connection connection, String tableName)
drop Table
Statement drop = null;
try {
    drop = connection.createStatement();
    drop.execute("DROP TABLE \"" + tableName + "\"");
} catch (SQLException e) {
} finally {
    close(drop);
voiddropTable(Connection dbConn, String tableName)
drop Table
Statement table = dbConn.createStatement();
table.execute("DROP TABLE " + tableName);
table.close();
voiddropTable(java.sql.Connection conn, java.lang.String table)
Drops a table from the JDBC database.
throw new RuntimeException();
voiddropTable(Statement st, String query)
drop Table
try {
    st.executeUpdate(query);
} catch (Exception e) {
voiddropTableIfExists(String tableName, java.sql.Statement stmt)
mimic "DROP TABLE IF EXISTS ..."
dropObjectIfExists(tableName, "IsTable", stmt);
voiddropTablesIfExist(Statement statement)
drop Tables If Exist
String dropSql = "DROP TABLE IF EXISTS transaction;";
String dropSql1 = "DROP TABLE IF EXISTS part;";
String dropSql2 = "DROP TABLE IF EXISTS category;";
String dropSql3 = "DROP TABLE IF EXISTS salesperson;";
String dropSql4 = "DROP TABLE IF EXISTS manufacturer;";
statement.execute(dropSql);
statement.execute(dropSql1);
statement.execute(dropSql2);
...