📜  检查表是否存在 sqlite java 代码示例

📅  最后修改于: 2022-03-11 14:52:44.349000             🧑  作者: Mango

代码示例1
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
}