|Table of Contents|
Execute a Script with Multiple Statements
Use the SQL Commander->Execute main menu operation to execute the SQL in the SQL Commander editor. The SQL Commander executes the statements one by one and indicates the progress in the log area. The currently selected Database Connection is used for all statements. The SQL Commander does not support executing SQLs for multiple database connections in one batch.
If you select a statement in the SQL editor and choose SQL Commander->Execute main menu option, only the selected statement is executed. This is a useful feature when you have several SQL statements in the SQL editor and you just want to execute one or a few of the statements.
Comments in the SQL editor are sent to the database when you use SQL Commander->Execute, unless you have enabled SQL Commander Options->Strip Strip Comments when Executing in the SQL Commander menu->SQL Commander Options menu.
Execute Only the Current Statement
Execute Current determines the actual statement by parsing the editor buffer using the standard statement delimiters.The current statement is the statement containing the caret or that ends on the line with the caret. This means that the caret may be after the statement delimiter as long as there is no other statement on the same line.
If you are unsure what the boundaries are for the current statement then use Edit->Select Current Statement. This will highlight the current statement without executing it.
The SQL Commander->Execute Buffer sends all of the content in the SQL editor to the database in a single run. This is useful when executing complex SQL statements such as CREATE STORE PROCEDURE (or similar) where statement splitting on semicolon must not be done as with SQL Commander->Execute and SQL Commander->Execute Current.
Control Execution after a Warning or an Error