Hitachi

Hitachi Advanced Database Application Development Guide


8.8.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‒79: Return values of the getColumnTypeName method

Column's data type (HADB data type)

Return value (character string returned)

BIGINT#

"BIGINT"

INTEGER

"INTEGER"

SMALLINT

"SMALLINT"

REAL

"REAL"

DECIMAL, NUMERIC

"DECIMAL"

CHAR

"CHAR"

DOUBLE PRECISION, FLOAT

"DOUBLE PRECISION"

VARCHAR

"VARCHAR"

STRING

"STRING"

DATE

"DATE"

TIME

"TIME"

TIMESTAMP WITHOUT TIME ZONE

"TIMESTAMP"

TIMESTAMP WITH TIME ZONE

"TIMESTAMP WITH TIME ZONE"

BINARY

"BINARY"

VARBINARY

"VARBINARY"

ROW

"ROW"

BOOLEAN

"BOOLEAN"

UUID

"UUID"

#

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.