So, I’m writing this Stored Proc and I really suck at SQL.
My Question to you guys is:
Can I select an entire row and store it in a variable?
I know I can do something like:
declare @someInteger int
select @someInteger = (select someintfield from sometable where somecondition)
But can I select the entire row from sometable and store it in a variable?
You can select the fields into multiple variables:
Another, potentially better, approach would be to use a table variable:
You can then select from your table variable like a regular table.