注册
 找回密码
 注册
江西广告网
查看: 265|回复: 0
打印 上一主题 下一主题

java

[复制链接]

该用户从未签到

1
跳转到指定楼层
发表于 2009-2-20 11:17:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?注册

x
ResultSetMetaData metaDate = rs.getMetaData(); int number = metaDate.getColumnCount(); String[] column = new String[number]; for (int j = 0; j < column.length; j ) { column[j] = metaDate.getColumnName(j 1); } //将字段名保存到数组column中 String getCatalogName(int column) Gets the designated column's table's catalog name. String getColumnClassName(int column) Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. int getColumnCount() Returns the number of columns in this ResultSet object. int getColumnDisplaySize(int column) Indicates the designated column's normal maximum width in characters. String getColumnLabel(int column) Gets the designated column's suggested title for use in printouts and displays. String getColumnName(int column) Get the designated column's name. int getColumnType(int column) Retrieves the designated column's SQL type. String getColumnTypeName(int column) Retrieves the designated column's database-specific type name. int getPrecision(int column) Get the designated column's number of decimal digits. int getScale(int column) Gets the designated column's number of digits to right of the decimal point. String getSchemaName(int column) Get the designated column's table's schema. String getTableName(int column) Gets the designated column's table name.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表