This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
 
wood burning stoves
 
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?