This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Get the Column count in Sql server using JDBC 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 "Get the Column count in Sql server using JDBC" Watch "Get the Column count in Sql server using JDBC" New topic
Author

Get the Column count in Sql server using JDBC

Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
Hi everyone
I want to get the column count in the table.I am sorry if there is a post already on this topic. I need to know this immediately so plz help.
Thanks in advance
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Two ways: look at java.sql.DatabaseMetaData, or write a SQL server specific query against syscolumns. (And please EaseUp)


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

You could issue some SQL like:

Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
thanks Dave that helped a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get the Column count in Sql server using JDBC
 
Similar Threads
SQL Query
DB structure
JTable and TableModel
Hibernate
i m new to hibernate