Sometimes it is necessary to execute vendor-specific SQL statements and queries. For these occasions Common SQL provides the functions query and execute-command. They can also be used when the exact SQL is known in advance and thus the square bracket syntax is not needed. The query expression can be a string, a SQL expression (a result of the [..] syntax) or a prepared statement (a result of prepare-statement).
The function query runs a SQL query on a database and returns a list of values like select (see Querying). It also returns a list of the field names selected.
execute-command is the basic function which executes any SQL statement other than a query. It can run a stored procedure, as described in execute-command.
LispWorks User Guide and Reference Manual - 21 Dec 2011