Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jdbc problem  RSS feed

 
rahul soni
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys
I have a problem!
how can i know numbers of colums in a database(database like oracle,mysql,mse...) table?

I.In sql prompte

II.By java+jdbc at the frient end.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JDBC you can use java.sql.DatabaseMetaData.getColumns(). That can be obtained through Connection.getMetaData().
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!