SQL restrictions within the stored procedure

Within the body of a stored procedure, you can use most SQL commands to do the tasks that relate to database objects.

You cannot use SQL commands that are prohibited for use within a BEGIN/COMMIT transaction block within the body of a stored procedure. Starting in release 7.1, you can define a BEGIN AUTOCOMMIT ON block within the body, and within that block you can use all SQL commands, even those prohibited for use in a BEGIN/COMMIT transaction block such as GENERATE STATISTICS and GROOM TABLE. For more information, see AUTOCOMMIT ON blocks.

For a description of the transaction control practices and command restrictions, see the IBM® Netezza® Database User’s Guide.