7.5.16 EXECUTE...END EXECUse the EXECUTE…END-EXEC statement to embed an anonymous block into a client application. The syntax is:EXEC SQL [AT database_name] EXECUTE anonymous_block END-EXEC;database_name is the database identifier or a host variable that contains the database identifier. If you omit the AT clause, the statement will be executed on the current default database.anonymous_block is an inline sequence of PL/pgSQL or SPL statements and declarations. You may include host variables and optional indicator variables within the block; each such variable is treated as an IN/OUT value.EXEC SQL EXECUTE
IF (current_user = :admin_user_name) THEN
DBMS_OUTPUT.PUT_LINE('You are an administrator');
END-EXEC;Please Note: the EXECUTE…END EXEC statement is supported only by Advanced Server.