1.1.1

Table Of Contents
DELETE
Delete rows from a table.
Syntax
{
DELETE FROM table-name [ [ AS ] correlation-name ]
[ WHERE Clause ]
}
Description
This form is called a searched delete, removes all rows identied by the table name and WHERE clause.
Statement dependency system
A searched delete statement depends on the table being updated, all of its conglomerates (indexes). A CREATE
or DROP INDEX statement for the target table of a prepared searched delete statement invalidates the prepared
searched delete statement.
Example
-- Delete rows from the CUSTOMERS table where the CID is equal
to 10.
DELETE FROM TRADE.CUSTOMERS WHERE CID = 10;
-- Delete all rows from table T.
DELETE FROM T;
EXPLAIN
Capture or display the query execution plan for a statement.
Syntax
EXPLAIN { sql_statement | 'statement_id' }
Description
When called with a SQL statement, the EXPLAIN command displays the slowest and fastest data store execution
plans for the statement, and stores the full query execution plan in the STATEMENTPLANS on page 661 table.
When called with a statement ID from SYS.STATEMENTPLANS, the EXPLAIN command displays the full
query plan for that statement. See Query Plan Codes for a description of the SQLFire query execution plan
codes. See Example Query Plan Analysis on page 272 for an example that describes the query plan output.
Note: You can capture query execution plans using either a thin client or peer client connection. However,
you can display a stored query execution plan only when using a peer client connection.
Note: Use the sqlf MaximumDisplayWidth on page 450 command to increase the display width before
you execute the EXPLAIN sql_statement command. If you do not increase the default
MAXIMUMDISPLAYWIDTH value, the EXPLAIN play output is truncated before any query plan codes
appear. If this occurs, re-run the EXPLAIN command, specifying the statement_id value.
As an alternative, you can capture query plans for all of the statements that are executed in a specic connection.
See Capture Query Plans for All Statements on page 272.
515
SQL Language Reference