Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java check if sql table exists

DatabaseMetaData dbm = con.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
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #check #sql #table #exists
ADD COMMENT
Topic
Name
7+9 =