Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 The Action Statements : DELETE Statement

DELETE Statement
The DELETE statement removes an occurrence from a table in the database. This statement requires the primary key to be available in one of the following ways:
Field Selection
You can specify which occurrence to remove by basing your selection criteria on the primary key field and using the equality relational operator (=). No other field selection is allowed.
Retrieving Uncommitted Data
If you delete an occurrence using a DELETE statement, you must commit the update to the table before you can retrieve the updated data. Otherwise, previously committed data that does not reflect your update is retrieved from the database. Refer to COMMIT Statement for more information about committing data.
Exceptions
 
Exceptions lower in the hierarchy of the INTEGRITYFAIL group can also be signaled.
Examples
1.
2.
GET STUDENT;
DELETE STUDENT;
About the Examples
If a GET or FORALL is performed without selection before the DELETE, as shown in example 2, the first occurrence in the table is deleted.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved