ParameterMetaData

Information about the parameters of a prepared statement.

Methods
String getParameterClassName(int param)
Returns the Java class name of the parameter.
int getParameterCount()
Returns the number of parameters.
int getParameterMode(int param)
Returns the parameter mode.
int getParameterType(int param)
Returns the parameter type.
String getParameterTypeName(int param)
Returns the parameter type name.
int getPrecision(int param)
Returns the parameter precision. 0 is returned if the precision is not known.
int getScale(int param)
Returns the parameter scale. 0 is returned if the scale is not known.
int isNullable(int param)
Checks if this is nullable parameter.
boolean isSigned(int param)
Checks if this parameter is signed.

String getParameterClassName(int param) throws SQLException

Returns the Java class name of the parameter. "java.lang.String" is returned if the type is not known.

Parameters:
param - the column index (1,2,...)
Returns:
the Java class name

int getParameterCount() throws SQLException

Returns the number of parameters.

Returns:
the number

int getParameterMode(int param) throws SQLException

Returns the parameter mode. Always returns parameterModeIn.

Parameters:
param - the column index (1,2,...)
Returns:
parameterModeIn

int getParameterType(int param) throws SQLException

Returns the parameter type. java.sql.Types.VARCHAR is returned if the data type is not known.

Parameters:
param - the column index (1,2,...)
Returns:
the data type

String getParameterTypeName(int param) throws SQLException

Returns the parameter type name. "VARCHAR" is returned if the type is not known.

Parameters:
param - the column index (1,2,...)
Returns:
the type name

int getPrecision(int param) throws SQLException

Returns the parameter precision. 0 is returned if the precision is not known.

Parameters:
param - the column index (1,2,...)
Returns:
the precision

int getScale(int param) throws SQLException

Returns the parameter scale. 0 is returned if the scale is not known.

Parameters:
param - the column index (1,2,...)
Returns:
the scale

int isNullable(int param) throws SQLException

Checks if this is nullable parameter. Returns ResultSetMetaData.columnNullableUnknown..

Parameters:
param - the column index (1,2,...)
Returns:
ResultSetMetaData.columnNullableUnknown

boolean isSigned(int param) throws SQLException

Checks if this parameter is signed. It always returns true.

Parameters:
param - the column index (1,2,...)
Returns:
true