wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 2491
    
    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
 
Similar Threads
com.sybase.jdbc2.jdbc.SybSQLException: Too many parameters -- symbol table overflow.
Populate Excel Spreadsheet
Align of two different tables
a very basic question on sql...
How to make JTable non docable?