JDBC Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 2.11

Microsoft JDBC Driver - DatabaseMetaData Object

This chapter provides tutorial notes on using DatabaseMetaData object to obtain information on database objects. Topics include getting SQL server and JDBC driver information; listing all databases on the SQL Server; listing all tables, stored procedures and schemas in the current database; listing all columns in a table or a view.

Commonly Used DatabaseMetaData Methods

Getting Database Server and Driver Info

Listing All Databases - getCatalogs()

Listing All Schemas - getSchemas()

Listing All Tables - getTables()

Listing All Culumns - getColumns()

Listing All Stored Procedures - getProcedures()

Dr. Herong Yang, updated in 2007
Microsoft JDBC Driver - DatabaseMetaData Object