Previous Topic

Next Topic

Book Contents

Book Index

Running an action SQL statement

Within the Run SQL window, you can run action SQL statements as well as queries.

You can run any valid SQL Action statement – Update, Delete, Insert, Create, Drop, Grant etc. Stored Procedures can be run.

When an Action statement is run you will get a message indicating the success (or otherwise) of the statement and the number of rows affected.

You might consider running the statement under Transaction Mode so you can roll back the changes if you decide they haven't done what you have intended.

You can run multiple statements (separated by a semicolon or other delimiter). See Running multiple action statements for a discussion on this.

DB2 Commands

DB2/UDB has the distinction between SQL statements (Select, Update, Grant etc) and Utility statements (Load, Export, Runstats). AQT can run both of these statement types; to run Utility statements, in the Run SQL Window select Edit > Run as Db2 Command.