I'm not sure how to ask this. I'm getting information in a stored procedure by running a select
and saving the results into a variable, but is there a way to reduce this, all of this is inside a stored procedure.
SET @VAR1 = (SELECT PAR1 FROM TABLE1)
SET @VAR2 = (SELECT PAR2 FROM TABLE1)
SET @VAR3 = (SELECT PAR3 FROM TABLE1)
but could I get it instead some other way?
Like:
SET @VAR1, @VAR2, @VAR3 = (SELECT PAR1, PAR2, PART3 FROM TABLE1)