A generic way might be to use the
Connection.getMetaData(),which will return you a DatabaseMetaData object.
you can use the getTables() api in there to get the list of tables.
Why write some db specific code when you can solve the whole thing through
generic
JDBC code???
Another question that I might think of here is which one would be more efficient.
Writing something like "select tname from tab" or using the DatabaseMetadata approach??
Thanks,
Chinmay