2
DatabaseMetaData metadata = con.getMetaData();
metadata.getTables(catalog, schemaPattern, tableNamePattern, types);

What fields are required to get a list of tables?

1 Answer 1

5

If you want a list of all tables, you should use:

metadata.getTables(null, null, null, new String[]{"TABLE"});
Sign up to request clarification or add additional context in comments.

1 Comment

For clarity, table names will en up in resultSet.getString(3)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.