This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 2543
    
  10

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get the number of columns in a table
 
It's not a secret anymore!