Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes JDBC and Relational Databases 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 The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 293

You could issue some SQL like:

Betsy Camel
Ranch Hand

Joined: Oct 02, 2003
Posts: 119
thanks Dave that helped a lot
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Get the Column count in Sql server using JDBC