The following examples illustrate the use of the USoft Rule Language REMOVE ALL and FOR WHICH keywords in delete statements.
USoft Rule Language
SQL Equivalent
REMOVE ALL drivers FOR WHICH age < 23
DELETE FROM driver WHERE age < 23
DELETE statements with subquery
REMOVE ALL drivers d FOR WHICH exists ( SELECT '' FROM contract c , business_party b RELATE b "PAYS FOR" c WHERE b.id = d.id AND c.paid = 'N' )
DELETE FROM driver d WHERE EXISTS ( SELECT '' FROM contract c , business_party b RELATE b "PAYS FOR" c WHERE b.id = d.id AND c.paid = 'N' )
See also