ResultSetMetaData Methods
These methods require a valid ResultSetMetaData object, returned from the getMetaData() method. They get information about the results. Columns begin at 1 for purposes of counting and offsetting.
getColumnCount
resultsetmetadata.getColumnCount()
Returns the number of columns in the result set.
getColumnDisplaySize
resultsetmetadata.getColumnDisplaySize(int column)
Returns the maximum character width of the specified column.
getColumnName
resultsetmetadata.getColumnName(int column)
Returns the fieldname of the specified column.
getColumnType
resultsetmetadata.getColumnType(int column)
Returns the SQL type of the specified column.
getColumnTypeName
resultsetmetadata.getColumnTypeName(int column)
Returns the database-specific type name of the specified column.
getPrecision
resultsetmetadata.getPrecision(int column)
Returns the number of decimals in the specified column.
getScale
resultsetmetadata.getScale(int column)
Returns the number of digits after the decimal point in the in the specified column.
getTableName
resultsetmetadata.getTableName(int column)
Returns the table name owning the specified column.
isAutoIncrement
resultsetmetadata.isAutoIncrement(int column)
Returns true if the specified column is an auto increment field, false if not.
isCaseSensitive
resultsetmetadata.isCaseSensitive(int column)
Returns true if the specified column is case sensitive, false if not.
isDefinitelyWritable
resultsetmetadata.isDefinitelyWritable(int column)
Returns true if a write on the specified column will succeed, false if it may not.
isNullable
resultsetmetadata.isNullable(int column)
Returns the nullable status of the specified column, which can be columnNoNulls, columnNullable, or columnNullableUnknown.
isReadOnly
resultsetmetadata.isReadOnly(int column)
Returns true if the specified column is read only, false if not.
isSearchable
resultsetmetadata.isSearchable(int column)
Returns true if the specified column can be used in a WHERE clause, false if not.
isSigned
resultsetmetadata.isSigned(int column)
Returns true if the specified column is a signed column, false if not.
isWritable
resultsetmetadata.isWritable(int column)
Returns true if the specified column can be written to, false if not.