Executing SQL statements (Insert, Update and Delete)

Á

Álvaro Moura

Last updated on Jul 6, 2026

With the macro macro sc_exec_sql you can execute SQL statements. Note that is useful to insert, update and delete because you dont get the output. If you need te output, use sc_lookup.

Sintax:

sc_exec_sql("SQL statement", "connection")The parameter connection is optional.

Example:

 if(condition)

{

sc_exec_sql("UPDATE table SET field='{field_value} ' where id={field_id}");

}