sc_exec_sql("SQL Command", "Connection")

This macro allows to condition the circumstances thats the SQL commands are executed.

The "Connection" parameter is optional. Required only, if the command is executed in a database different from the application.

Ex. 1:
if (sc_after_delete) {
sc_exec_sql("delete from mytable where key = {key_ant}");
}