In MySQL I'm trying to write a Stored Procedure which does the following:
- Run a SELECT query which returns 1 row with 2 columns (so two pieces of information).
- Run an INSERT query which includes the two previous values returned and a few parameters which were passed into the stored procedure.
I was originally thinking I could store the two pieces of information from Step 1 into a variable, and then pass those into Step 2. After some reading though it seems that a variable in MySQL can only hold 1 piece of data. How can I get the 2 pieces of information from Step 1 into my INSERT statement in Step 2?
Thank you!