Prepared Statements

System views for querying active prepared statements information in the user session.

sys.prepared_statements

nametypereferencesdescription
"sessionid"INTEGERsys.sessions.sessionidThe internal session identifier.
"username"VARCHARsys.users.nameThe user who created the prepared statement.
"statementid"INTEGERThe internal prepared statement identifier. This value must be used to execute the prepared statement.
"statement"VARCHARThe original SQL prepare statement.
"created"TIMESTAMPCreation date and time of the prepared statement.

sys.prepared_statements_args

nametypereferencesdescription
"statementid"INTEGERsys.prepared_statements.statementidThe internal prepared statement identifier.
"type"VARCHARsys.types.sqlnameThe SQL type name.
"type_digits"INTEGERThe number of digits (radix 2) for numeric types or max length for character/binary strings.
"type_scale"INTEGERThe precision after decimal point. Only applicable for decimal/numeric types.
"inout"TINYINTWhether the argument is an input (=1) argument or an output(=0) result column.
"number"INTEGERThe argument position starting from 0. First the output result columns are listed next the input parameters.
"schema"VARCHARThe schema name of an output argument.
"table"VARCHARThe table name of an output argument.
"column"VARCHARThe column name of an output argument.