Uh oh!
There was an error while loading. Please reload this page.
MSSQL: Add support for OUTPUT clause on INSERT/UPDATE/DELETE - #2228
Conversation
| pub on: Option<OnInsert>, | ||
| /// RETURNING | ||
| pub returning: Option<Vec<SelectItem>>, | ||
| /// OUTPUT (MSSQL) |
There was a problem hiding this comment.
for these comments, could we include the link to the mssql docs describing the syntax? it would help with nagivation when folks look at the struct
There was a problem hiding this comment.
Sure, that makes sense and just added.
| // MSSQL OUTPUT clause appears after FROM table, before USING/WHERE | ||
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
There was a problem hiding this comment.
| // MSSQL OUTPUT clause appears after FROM table, before USING/WHERE | |
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
| // MSSQL OUTPUT clause appears between columns and source | ||
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
There was a problem hiding this comment.
| // MSSQL OUTPUT clause appears between columns and source | |
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
| // MSSQL OUTPUT clause appears after SET, before FROM/WHERE | ||
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
There was a problem hiding this comment.
| // MSSQL OUTPUT clause appears after SET, before FROM/WHERE | |
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
maybe we can introduce a helper function maybe_parse_output_clause() that can be called from the relevant statement parsing functions?
There was a problem hiding this comment.
Yes, that would be better. Thanks, just updated!
| // MSSQL OUTPUT clause on INSERT/UPDATE/DELETE | ||
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql | ||
There was a problem hiding this comment.
| // MSSQL OUTPUT clause on INSERT/UPDATE/DELETE | |
| // https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql |
5671dae to
02033abCompareiffyio
commented
Feb 27, 2026
@guan404ming could you resolve the conflicts on the branch when you get the chance? |
Signed-off-by: Guan-Ming Chiu <guanmingchiu@gmail.com>
02033ab to
1634386Compareguan404ming
commented
Feb 27, 2026
Yeah sure, just updated. Thanks! |
guan404ming
commented
Feb 27, 2026
Thanks for your review! |
Uh oh!
There was an error while loading. Please reload this page.
Why
MSSQL's OUTPUT clause allows returning inserted/deleted column values from DML statements, but was only supported on MERGE.
How
OUTPUTandVALUESkeywords for table/column alias contexts to prevent ambiguous parsingOUTPUTwith and withoutINTOon all three statement types