Example of DELETE - SQL
As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example.
Example: Deleting a "portion" of the salary history table
DELETE SAL_HISTORY
FOR PORTION OF During
FROM DATE ('2012-01-01') TO DATE ('2012-02-01')
WHERE EmpNo = '123456';
As a result, the row
('123456', 55000, DATE ('2011-09-01'), DATE ('2012-08-01'))
is replaced by the two rows
('123456', 55000, DATE ('2011-09-01'), DATE ('2012-01-01')),
('123456', 55000, DATE ('2012-02-01'), DATE ('2012-08-01'))
and the DELETE statement will have effected an increase in cardinality instead of the usual decrease.