Allow variable assignment using DML OUTPUT clause - by Adam Machanic

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 150944 Comments
Status Closed Workarounds
Type Suggestion Repros 2
Opened 6/28/2006 10:25:43 PM
Access Restriction Public


The OUTPUT clause added to the DML statements is quite useful as-is, but would be even better if it could be used for variable assignment.  There is an issue of multi-row operations, but I think it could behave similarly to variable assignment using SELECT in those cases (i.e., which row would end up assigning to the variables would be nondeterministic).

This would be really great for single-row operations, when a temp table/table variable is really overkill as we just need to assign a couple of values from the affected rows to some variables.
Sign in to post a comment.
Posted by Microsoft on 10/10/2006 at 6:25 PM
Dear Adam

Thanks for your suggestion. The product team is currently investigating your request for this functionality and may consider it for a future release.

Best regards