8.7.11 getScale(int column)
- Organization of this subsection
(1) Function
This method acquires the number of decimal places in a specified column.
(2) Format
public synchronized int getScale(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 decimal number indicating the number of decimal places. The following table shows the return values of the getScale method.
Column's data type (HADB data type) |
Return value (number of decimal places) |
---|---|
DECIMAL(m,n) |
n |
TIME(p) TIMESTAMP(p) |
p |
Other than the above |
0 |
(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.