11.2.8 getScale(int param)
- Organization of this subsection
(1) Function
This method acquires the number of decimal places in a specified parameter.
(2) Format
public synchronized int getScale(int param) throws SQLException
(3) Arguments
- int param
-
Specifies a parameter number (beginning with 1).
(4) Return value
The method returns a decimal number indicating the number of decimal places in the specified column. The following table shows the return values of the getScale method.
Parameter'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 param value is 0 or less, or is greater than the number of parameters, the JDBC driver throws an SQLException.