aspose file tools*
The moose likes JDBC and the fly likes How to get the number of columns in a table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to get the number of columns in a table" Watch "How to get the number of columns in a table" New topic
Author

How to get the number of columns in a table

ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
Hi,
Is there any query to fetch number of columns in a table in postgres?

thanks
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

Hi, the Java documentation is your friend. And in your case, a very good friend - because it contains an actual solution for your subject:
java.sql.ResultSetMetaData

OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get the number of columns in a table