You can also define a rule to delete a record from a database. As in the case of defining rules to perform read operations, there are two scenarios in which you may want to delete records:

  • You want to delete a specific record. In this case, you need to use the record’s primary key value.
  • You want to delete ALL records that satisfy certain conditions. In this case, you do not need to use primary keys.

You use the .remove operator to delete records. The .remove operator can only be used in a rule action. You can find it in the Rule Operators view, under Entity/Association Operators > Entity.