Progress
Embedded SQL-92
Guide and Reference
DELETE Rows from a Table
A DELETE statement deletes one or more rows from an existing table, depending on the selection criteria in the WHERE clause.
CAUTION: If you do not specify a WHERE clause, the DELETE statement deletes all rows from the table. EXAMPLEThe following code fragment shows how to use a DELETE statement to delete a row from the customer table. The program uses the host variable cust_no_v to match a row with cust_no 1005, and deletes the row from the table. If the cust_no column is a primary key or is a candidate key, one row is deleted. If there are multiple rows with cust_no = 1005, multiple rows are deleted:
A DELETE operates on more than one row if the WHERE clause matches multiple rows.
EXAMPLEThe following example deletes any rows from the orders table where the value in the order_date column is less than 2/2/1999:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |