1、判断数据库表是否存在
java.sql.Connection con = getYourConnection();
ResultSet rs = con.getMetaData().getTables(null, null, "yourTable", null );
if (rs.next()) {
//yourTable exist
}else {
//yourTable not exist
}
1、判断数据库表是否存在
java.sql.Connection con = getYourConnection();
ResultSet rs = con.getMetaData().getTables(null, null, "yourTable", null );
if (rs.next()) {
//yourTable exist
}else {
//yourTable not exist
}