热列祝贺:中国共产党第十七次全国代表大会胜利闭幕   颜色主题:   网页游戏 软件下载 软件文章 常用网址 自助友情
 首页程序设计数据库操作系统办公系列WEB开发项目专题网络安全图形图像站点地图友情链接
 您的位置: >首页 >程序设计 >Java >JDK API 参考 >java.sql >接口(Interface) >ResultSetMetaData
  文章搜索
按名称 按简介
  本类推荐
· CallableStatement
· Connection
· DatabaseMetaData
· Driver
· PreparedStatement
· ResultSet
· ResultSetMetaData
· Statement
  本类排行
· ResultSetMetaData
· CallableStatement
· Connection
· ResultSet
· Driver
· Statement
· DatabaseMetaData
· PreparedStatement
ResultSetMetaData

ResultSetMetaData 对象可以用于查找 ResultSet 中的列的类型和特性。

接口 java.sql.ResultSetMetaData

public interface ResultSetMetaData

变量索引

columnNoNulls
不允许 NULL 值。
columnNullable
允许 NULL 值。
columnNullableUnknown
不知是否允许 NULL。

方法索引

getCatalogName(int)
获得列的表的目录名。
getColumnCount()
获得 ResultSet 中的列数。
getColumnDisplaySize(int)
获得列的正常的最大字符宽度。
getColumnLabel(int)
获得打印输出和显示的建议列标题。
getColumnName(int)
获得列名。
getColumnType(int)
获得一个列的 SQL 类型。
getColumnTypeName(int)
获得一个列的数据源特定的类型名。
getPrecision(int)
获得一个列的十进制数字的位数。
getScale(int)
获得一个列的十进制小数点右面数字的位数。
getSchemaName(int)
获得一个列的表的模式。
getTableName(int)
获得列的表名。
isAutoIncrement(int)
列是否自动计数,因此它是只读的。
isCaseSensitive(int)
列是否区分大小写。
isCurrency(int)
列是否是通用的。
isDefinitelyWritable(int)
对列的写操作是否一定成功。
isNullable(int)
在该列中是否可以放一个 NULL 值。
isReadOnly(int)
列是否是不可写的。
isSearchable(int)
该列是否是可以查询的。
isSigned(int)
该列是否是有符号数。
isWritable(int)
对该列的写操作是否会成功。

变量

columnNoNulls
 public static final int columnNoNulls
不允许 NULL 值。

columnNullable
 public static final int columnNullable
允许 NULL 值。

columnNullableUnknown
 public static final int columnNullableUnknown
不知是否允许 NULL。


方法

getColumnCount
 public abstract int getColumnCount() throws SQLException
获得 ResultSet 中的列数。

返回值:
该数值
抛出: SQLException
如果发生了数据访问错误。
isAutoIncrement
 public abstract boolean isAutoIncrement(int column) throws SQLException
列是否自动计数,因此它是只读的。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
果真如此则为 true
抛出: SQLException
如果发生了数据访问错误。
isCaseSensitive
 public abstract boolean isCaseSensitive(int column) throws SQLException
列是否区分大小写。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
isSearchable
 public abstract boolean isSearchable(int column) throws SQLException
该列能否用于一 where 子句?

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
isCurrency
 public abstract boolean isCurrency(int column) throws SQLException
列是否是通用的。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
isNullable
 public abstract int isNullable(int column) throws SQLException
在该列中是否可以放一个 NULL 值。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
columnNoNulls、columnNullable 或 columnNullableUnknown
抛出: SQLException
如果发生了数据访问错误。
isSigned
 public abstract boolean isSigned(int column) throws SQLException
该列是否的有符号数。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
getColumnDisplaySize
 public abstract int getColumnDisplaySize(int column) throws SQLException
获得列的正常的最大字符宽度。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
最大宽度
抛出: SQLException
如果发生了数据访问错误。
getColumnLabel
 public abstract String getColumnLabel(int column) throws SQLException
获得用于打印输出和显示的建议列标题。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
getColumnName
 public abstract String
getColumnName(int column) throws SQLException
获得列名。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
列名
抛出: SQLException
如果发生了数据访问错误。
getSchemaName
 public abstract String getSchemaName(int column) throws SQLException
获得一个列的表的模式。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
模式名,如果不可用则为 ""
抛出: SQLException
如果发生了数据访问错误。
getPrecision
 public abstract int getPrecision(int column) throws
SQLException
获得一个列的十进制数字的位数。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
精度
抛出: SQLException
如果发生了数据访问错误。
getScale
 public abstract int getScale(int column) throws
SQLException
获得一个列的十进制小数点右面数字的位数。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
小数位数
抛出: SQLException
如果发生了数据访问错误。
getTableName
 public abstract String
getTableName(int column) throws SQLException
获得列的表名。

返回值:
表名,如果不可用则为 ""
抛出: SQLException
如果发生了数据访问错误。
getCatalogName
 public abstract String
getCatalogName(int column) throws SQLException
获得列的表的目录名。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
列名,如果不可用则为 ""
抛出: SQLException
如果发生了数据访问错误。
getColumnType
 public abstract int getColumnType(int column) throws
SQLException
获得一个列的 SQL 类型。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
SQL 类型
抛出: SQLException
如果发生了数据访问错误。
参见:
Types
getColumnTypeName
 public abstract String
getColumnTypeName(int column) throws SQLException
获得一个列的数据源特定的类型名。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
类型名
抛出: SQLException
如果发生了数据访问错误。
isReadOnly
 public abstract boolean isReadOnly(int column) throws
SQLException
列是否是不可写的。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
isWritable
 public abstract boolean isWritable(int column) throws
SQLException
对该列的写操作是否会成功。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
果真如此则为 true
抛出: SQLException
如果发生了数据访问错误。
isDefinitelyWritable
 public abstract boolean isDefinitelyWritable(int column) throws
SQLException
对列的写操作是否一定成功。

参数:
column - 第一列是 1, 第二个列是 2, ...
返回值:
确实如此则为 true
抛出: SQLException
如果发生了数据访问错误。
  相关软件
  相关文章
下载帮助 发布软件 自助友情 友情链接 网站导航 广告服务 法律声明 联系我们
六世下载 版权所有 ©2005-2007
本站的数据收集于网络,版权归原作者及出版社所有 如果您觉得侵犯了您的版权请来信告诉我们,我们会尽快删除其内容!
鲁ICP备05050400号