Hitachi

Hitachi Advanced Database Application Development Guide


8.7.9 getColumnTypeName(int column)

Organization of this subsection

(1) Function

This method acquires a specified column's data type.

(2) Format

public synchronized String getColumnTypeName(int column) throws SQLException

(3) Arguments

int column

Specifies a column number (where the first column is 1).

(4) Return value

The method returns a String object. The following table shows the return values of the getColumnTypeName method.

Table 8‒73: Return values of the getColumnTypeName method

Column's data type (HADB data type)

Return value (character string returned)

INTEGER

"INTEGER"

SMALLINT

"SMALLINT"#

DECIMAL

"DECIMAL"

CHAR

"CHAR"

DOUBLE PRECISION

"DOUBLE PRECISION"

VARCHAR

"VARCHAR"

DATE

"DATE"

TIME

"TIME"

TIMESTAMP

"TIMESTAMP"

BINARY

"BINARY"

VARBINARY

"VARBINARY"

ROW

"ROW"

BOOLEAN (column found only in a ResultSet created from DatabaseMetaData)

"BOOLEAN"

#

This column is found only in a ResultSet created from DatabaseMetaData. If the column's data type is defined as short, this value is returned.

(5) Exceptions

If the specified column value is 0 or less, or is greater than the number of columns in the table, the JDBC driver throws an SQLException.