现在我正在使用类似于:
dbResult = dbStatement.executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '[e2]' AND table_name = '[emp101_messages]'");
while(dbResult.next())
{
int value = -1;
value= dbResult.getInt(1);
System.out.println(value + " table count");
}
这是检查数据库中是否存在一个表的正确方法吗?