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}");

}

![](https://desk.zoho.com/DocsDisplay?zgId=716875472&mode=inline&blockId=k97k90f6474a3d5f7472c80a8db38485c29dc)

![]()