Nonstop Database, HiRDB Version 9 UAP Development Guide
The ResultSetMetaData class provides the following functions:
true is returned if the column specified by the column parameter can be used for the WHERE clause; otherwise, false is returned as the return value. For the WHERE clause, true is always returned to enable use of all data type columns. However, for the first column of ResultSet, which is the return value of the Array.getResultSet method, false is returned. For details about getResultSet, see 17.6 Array class.
SELECT * FROM T1 WHERE LENGTH (C1) > 5
The return value is the maximum number of characters when the column specified by the column parameter is expressed in a character string. However, for the first column of ResultSet, which is the return value of the Array.getResultSet method, 10 is returned. The following table lists the return values for this method for each SQL data type in HiRDB.
Table 17-4 Return values of the getColumnDisplaySize method for each SQL data type in HiRDB
SQL data type in HiRDB | Return value (int) | Return value format |
---|---|---|
INTEGER | 11 | 1 sign character + 10 digits, which is the maximum number of digits |
SMALLINT | 6 | 1 sign character + 5 digits, which is the maximum number of digits |
DECIMAL(m,n) NUMERIC(m,n)
|
m + 2 | 1 sign character + accuracy m + 1 decimal point digit |
FLOAT DOUBLE PRECISION |
23 | 1 sign character + 17 digits, which is the maximum number of significant digits + 1 decimal point character + 4, which is the maximum number of characters in the index area |
SMALLFLT REAL |
13 | 1 sign character + 8 digits, which is the maximum number of significant digits + 1 decimal point character + 3, which is the maximum number of characters in the index area |
CHAR(n)
|
n | NA |
VARCHAR(n) CHAR VARYING(n)
|
n | NA |
NCHAR(n) NATIONAL CHAR(n)
|
n | NA |
NVARCHAR(n) NATIONAL CHAR VARYING(n) NCHAR VARYING(n)
|
n | NA |
MCHAR(n)
|
n | NA |
MVARCHAR(n)
|
n | NA |
DATE | 10 | yyyy-mm-dd, which is 10 characters |
TIME | 8 | hh:mm:ss, which is 8 characters |
TIMESTAMP(p)
|
|
(1) yyyy-mm-dd hh:mm:ss, which is 19 characters (2) 19 characters shown above + 1 decimal point character + p, which is the number of digits of the decimal part |
BLOB(n[K|M|G])
|
|
NA |
BINARY(n)
|
N | NA |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.