Getting all table names and their columns from database
1 posts in topic
Flat View  Flat View

Posted By:   Arvind_S
Posted On:   Sunday, March 3, 2002 10:27 PM

I just want to know retrieving all the table names that are available in a database. Also I want to know the fields of a given table.

Could anyone provide me a sample Java code that does the operation of what I require?
Thank you.

Use DataBaseMetaData class of java.sql!_NEWLINE_!package

Posted By:   irfan_mansha  
Posted On:   Sunday, March 3, 2002 11:04 PM

// Get JDBC connection conn

call mathod of Connection interface


This will return the object of DataBaseMetaData interface.

Using this object you can get your
required information about Data Base.

I hope this will help u.

Irfan Mansha
About | Sitemap | Contact