===Returning Results===
It is not possible to mix different types of expressions in a query result. The outermost expression of a query must either be a collection of updating or non-updating expressions. There is no The only way to perform any updating queries and return a result at the same time, except for using is to use the BaseX-specific [[Database Module#db:output|db:output()]] function, which caches the results of its arguments at runtime and returns it them after all updates have been processed.
Example: Perform update and return success message.