Assign multiple variables in a SP?
Is it possible to use a recordset in a stored procedure, or at least assign
multiple variables with one select statement? ie.
SET @Var1, @Var2 = (SELECT Field1, Field2 FROM TableName WHERE ID = 7).
I don't want to have to make multiple queries to the database. ie.
SET @Var1 = SELECT Field1 FROM TableName WHERE ID = 7
SET @Var2 = SELECT Field2 FROM TableName WHERE ID = 7
How do I handle the situation with multiple records? ie.
SELECT Field1, Field2 from TableName WHERE ID <= 7
Is any of this possible from within a stored procedure?
If I've confused you: I want to be able to run a SELECT query and use the
results within the SP (not return them to the calling app).
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center