Command SQL Professional
Executes an SQL statement
SQL <statement> [VIA <session>] or SQL <statement> INTO <variable> [VIA <session>] or SQL CMD <statement> [VIA <session>]
The <statement> parameter is the SQL statement to be executed. After execution, a workarea is open where results can be fetched.
The <variable> designates a variable that will hold the result of the SQL statement. This is useful if the statement returns one result only, like SELECT AVG(*). There is no workarea open after execution of this command.
The argument <statement> will be executed but no result or workarea is made available. This command is useful to submit SQL statements not delivering any results.
The argument <session> explicitly determines the session where the SQL statement is to be executed. If <session> was not passed, the return value of DbSession() or DacSession():getDefault() is used.
The command SQL executes an SQL statement. Depending on which one of the various forms has been used, a workarea is open after execution to fetch the results.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.