• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tables and fields

 
Xinyi Zhang
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to list tables in specific database and how to find field name and its data type using Java program? Thanks.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the javadocs on java.sql.Connection#getMetaData(). Calling myConnection.getMetaData().getTables(null, null, null, null) should return all tables.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic