Structured Query Language (SQL) APIs
The SQL APIs are:
- Add or replace labels in catalog descriptions (LABEL) adds or replaces labels in the catalog descriptions of tables, views, aliases, packages, or columns.
- Allocate an SQL descriptor (ALLOCATE DESCRIPTOR) allocates an SQL descriptor.
- Allow LOB locator to retain association with value (HOLD LOCATOR) allows a LOB locator variable to retain its association with a value beyond a unit of work.
- Alter a sequence (ALTER SEQUENCE) alters the definition of a sequence.
- Alter a table (ALTER TABLE) alters the description of a table.
- Alter an external procedure (ALTER PROCEDURE) alters the definition of an external procedure at the current server.
- Alter an external scalar function (ALTER FUNCTION) alters an external scalar function at the current server.
- Alter an external table function (ALTER FUNCTION) alters an external table function at the current server.
- Alter an SQL procedure (ALTER PROCEDURE) alters the definition of an SQL procedure at the current server.
- Alter an SQL scalar function (ALTER FUNCTION) alters an SQL scalar function at the current server.
- Alter an SQL table function (ALTER FUNCTION) alters an SQL table function at the current server.
- Assign a value to CURRENT PATH special register (SET PATH) changes the value of the CURRENT PATH special register.
- Assign a value to the CURRENT DEBUG MODE special register (SET CURRENT DEBUG MODE) changes the value of the CURRENT DEBUG MODE special register.
- Assign a value to the CURRENT DECFLOAT ROUNDING MODE special register (SET CURRENT DECFLOAT ROUNDING MODE) changes the value of the CURRENT DECFLOAT ROUNDING MODE special register.
- Assign a value to the CURRENT DEGREE special register (SET CURRENT DEGREE) changes the value of the CURRENT DEGREE special register.
- Assign a value to the default encryption password and hint (SET ENCRYPTION PASSWORD) sets the default password and hint that are used by the encryption and decryption functions.
- Assign a value to the SESSION USER and USER special registers (SET SESSION AUTHORIZATION) changes the value of the SESSION USER and USER special registers.
- Assign value to CURRENT SCHEMA special register (SET SCHEMA) changes the value of the CURRENT SCHEMA special register.
- Assign values to a host variable (SET variable) produces a result table consisting of at most one row and assigns the values in that row to host variables.
- Assign values to a transition variable (SET transition-variable) assigns values to a transition variable.
- Assign values to host variables (SELECT INTO) produces a result table consisting of at most one row, and assigns the values in that row to host variables.
- Bind LOB file reference to LOB column (SQLBindFileToCol) is used to associate (bind) a LOB column in a result set to a file reference or an array of file references.
- Bind LOB file reference to LOB parameter (SQLBindFileToParam) is used to associate (bind) a parameter marker in an SQL statement to a file reference or an array of file references.
- Call a procedure (CALL) calls a procedure.
- Change Dynamic Default Collection (QSQCHGDC) defines a default collection for unqualified table names in dynamically prepared statements or in dynamically executed statements.
- Change isolation level for unit of work (SET TRANSACTION) sets the isolation level and read only attribute for the current unit of work.
- Close a cursor (CLOSE) closes a cursor.
- Comment on various objects (COMMENT) replaces or adds a comment to the description of an alias, column, function, index, package, parameter, procedure, table, type or view.
- Connect to a server and establish rules (Type 1) (CONNECT) connects an activation group within an application process to the identified server using the rules for remote unit of work.
- Connect to a server and establish rules (Type 2) (CONNECT) connects an activation group within an application process to the identified server using the rules for application directed distributed unit of work.
- Create a function based on another existing function (CREATE FUNCTION) creates a user-defined function, based on another existing scalar or column function, at the current server.
- Create a schema and objects in that schema (CREATE SCHEMA) defines a schema at the current server and optionally creates tables, views, aliases, indexes, and distinct types.
- Create a sequence (CREATE SEQUENCE) creates a sequence at the application server.
- Create a table (CREATE TABLE) defines a table at the current server.
- Create a trigger (CREATE TRIGGER) defines a trigger at the current server.
- Create a type (CREATE TYPE) defines a type at the current server.
- Create an alias (CREATE ALIAS) defines an alias on a table, view, or member of a database file at the current server.
- Create an external procedure (CREATE PROCEDURE) defines an external procedure at the current server.
- Create an external scalar function (CREATE FUNCTION) defines an external scalar function at the current server.
- Create an external table function (CREATE FUNCTION) creates an external table function at the current server.
- Create an index on a table (CREATE INDEX) creates an index on a table at the current server.
- Create an SQL procedure (CREATE PROCEDURE) creates an SQL procedure at the current server.
- Create an SQL scalar function (CREATE FUNCTION) creates an SQL function at the current server.
- Create an SQL table function (CREATE FUNCTION) creates an SQL table function at the current server.
- Create view of table (CREATE VIEW) creates a view on one or more tables or views at the current server.
- Deallocate an SQL descriptor (DEALLOCATE DESCRIPTOR) deallocates an SQL descriptor.
- Define a declared global temporary table (DECLARE GLOBAL TEMPORARY TABLE) defines a declared temporary table for the current application process.
- Define an SQL cursor (DECLARE CURSOR) defines an SQL cursor.
- Delete rows from a table (DELETE) deletes rows from a table or view.
- Describe the columns of a table or view (DESCRIBE TABLE) obtains information about the columns of a table or view.
- Describe the input parameter markers of a prepared statement (DESCRIBE INPUT) obtains information about the IN and INOUT parameter markers of a prepared statement..
- Describe the result columns of a prepared statement (DESCRIBE) obtains information about a prepared statement.
- Drop an object (DROP) drops an alias, function, index, package, procedure, schema, table, trigger, type, or view.
- End a unit of work (ROLLBACK) ends a unit of work and back out all the relational database changes, or back out only the changes made after a savepoint was set.
- End a unit of work (COMMIT) ends a unit of work and commits the database changes made by that unit of work.
- End connection (DISCONNECT) ends one or more connections for unprotected conversations.
- Execute a query (SELECT) executes a query.
- Execute prepared SQL statement (EXECUTE) executes a prepared SQL statement.
- Generate Data Definition Language (QSQGNDDL) generates the SQL data definition language statements required to recreate a database object.
- Get information from an SQL descriptor (GET DESCRIPTOR) retrieves information from an SQL descriptor.
- Grant privileges on a function or procedure (GRANT) grants privileges on a function or procedure.
- Grant privileges on a package (GRANT) grants privileges on a package.
- Grant privileges on a sequence (GRANT) grants privileges on a sequence.
- Grant privileges on a table or view (GRANT) grants privileges on tables or views.
- Grant privileges on a type (GRANT) grants privileges on a type.
- Identify result sets in a procedure (SET RESULT SET) identifies one or more result sets that can be returned from an external procedure when the procedure is called by a iSeries Access client, the SQL Call Level Interface, or when accessed from a remote system using DRDA.
- Insert rows into a table (INSERT) inserts rows into a table or view.
- Obtain information about SQL statement (GET DIAGNOSTICS) obtains information about the previous SQL statement that was executed.
- Open a cursor (OPEN) opens a cursor.
- Place one or more connections in the release-pending state. (RELEASE (Connection)) places one or more connections in the release-pending state.
- Position cursor on table (FETCH) positions a cursor on a row of the result table, and can also assign values from one or more rows of the result table to host variables.
- Prepare an SQL statement for execution (PREPARE) creates an executable form of an SQL statement from a character-string form of the statement.
- Prepare and execute an SQL statement (EXECUTE IMMEDIATE) prepares and executes an SQL statement.
- Prevent changing or using a table (LOCK TABLE) prevents either concurrent processes from changing a table or prevents concurrent processes from using a table.
- Process Extended Dynamic SQL (QSQPRCED) processes Structured Query Language (SQL) extended dynamic statements in an SQL package object.
- Provide method to invoke function (VALUES) provides a method to invoke a user-defined function from a trigger.
- Refresh a materialized query table (REFRESH TABLE) refreshes the data in a materialized query table.
- Release savepoint within unit of work (RELEASE SAVEPOINT) releases the identified savepoint and any subsequently established savepoints within a unit of work.
- Remove association of LOB locator and its value (FREE LOCATOR) removes the association between a LOB locator variable and its value.
- Rename a table, view, or index (RENAME) renames a table, view, or index.
- Resignal an error or warning condition (RESIGNAL) is used within a handler to return an error or warning condition.
- Return from a routine (RETURN) returns from a routine.
- Revoke function or procedure privileges (REVOKE) removes the privileges on a function or procedure.
- Revoke package privileges (REVOKE) removes the privilege to execute statements in a package.
- Revoke sequence privileges (REVOKE) removes the privileges on a sequence.
- Revoke table privileges (REVOKE) removes the privileges on a table or view.
- Revoke type privileges (REVOKE) removes the privileges on a type.
- Set a savepoint within unit of work (SAVEPOINT) sets a savepoint within a unit of work to identify a point in time within the unit of work to which relational database changes can be rolled back.
- Set Client Information (sqleseti()) permits an application to set client information associated with a specific connection, provided that a connection already exists.
- Set connection to establish server (SET CONNECTION) establishes the current server of the activation group by identifying one of its existing connections.
- Set items in an SQL descriptor (SET DESCRIPTOR) sets information in an SQL descriptor.
- Signals an error or warning condition (SIGNAL) causes an error or warning to be returned with the specified SQLSTATE and optional message text.
- Specify a result table (VALUES INTO) produces a result table consisting of at most one row and assigns the values in that row to host variables.
- SQL LOB Append to Locator (sqludf_append()) appends data to the end of the LOB data the locator represents.
- SQL LOB Create Locator (sqludf_create_locator()) creates a LOB locator.
- SQL LOB Create Locator with CCSID (sqludf_create_locator_with_ccsid()) creates a LOB locator with a given CCSID.
- SQL LOB Free Locator (sqludf_free_locator()) frees a LOB locator.
- SQL LOB locator CCSID (sqludf_ccsid()) returns the CCSID of the LOB data represented by a LOB locator.
- SQL LOB Locator Length (sqludf_length()) returns the length of the LOB data represented by a LOB locator.
- SQL LOB Substring Locator (sqludf_substr()) returns a substring of the LOB data the locator represents.
- Syntax Check SQL Statement (QSQCHKS) calls the DB2 for iSeries SQL parser to check the syntax of an SQL statement.
- Update values of columns in rows of a table (UPDATE) updates the values of specified columns in rows of a table or view.