• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get the Column count in Sql server using JDBC

 
Betsy Camel
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two ways: look at java.sql.DatabaseMetaData, or write a SQL server specific query against syscolumns. (And please EaseUp)
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could issue some SQL like:

 
Betsy Camel
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Dave that helped a lot
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic