What's the best way to determine, through JDBC, if a table exists in the database?
One way is to run a query on that table and catch the exception. (E.g. "SELECT count(*) from table_name"). If no exception is thrown, table exists, otherwise not.
There has got to be a better way than this. Does standard SQL provide any such mechanism? A quick search didn't reveal anything.
Not to mention, DB independent mechanism would be preferred.