Skip to content

execute_if

jeremywinters edited this page Apr 15, 2017 · 3 revisions

Command: EXECUTE_IF

description:

execute a SQL statement if condition is true

parameters:

  • required - expression1
  • required - conditional_operator... = != >= =< > <
  • required - expression2

behavior:

  • evaluates provided condition. if condition is true, SQL statement is executed
  • stores (and overwrites) 'last_statement_rows_affected' variable, but this behavior may be inconsistent when running multiple SQL statements

examples:

 /*-execute_if :last_statement_rows_affected > 0-*/ 
 insert into public.test values (1);