I want to do the same as in the answers to this question:
[Check if table exists](https://stackoverflow.com/questions/2942788/check-if-table-exists)
but I want to check if any table exist, not just a particular table and not iterating through table names, I mean if there's any table at all in the database.
According to the API, the third argument of getTables(),

> tableNamePattern - a table name pattern; must match the table name as it is stored in the database

So it seems the tableName should match exactly in the database. Is there a better way to find if any table exist in the database? Or I really have to loop through an array of table names and call:

```
getConnection().getMetaData().getTables(null, null, "table", null).next();

```

each iteration?