3 ms·
> SQL prohibits that, separating queries and data manipulation statements. With the exception of the case where the set of rows you want to return (a projectio
by dragonwriter 4y ago
> SQL prohibits that, separating queries and data manipulation statements.
With the exception of the case where the set of rows you want to return (a projection of) are exactly the same ones being modified.
IIRC, you can hack around this about with JOIN in the FROM clause of the main statement even if it is only of substantive use in the RETURNING clause, to get what amounts to arbitrary data modifying queries.