title: how to update rows of temporary table in stored procedure in mysql
body: <p>i wrote a  stored procedure(getAllInitializedContact())to get data from diffrent tables.getAllInitializedContact()</p>
  
  <pre><code>CREATE DEFINER=`root`@`192.168.1.15` PROCEDURE `getAllInitializedContactNext`()
  BEGIN
  
   DROP TEMPORARY TABLE IF EXISTS temp_users;
   CREATE TEMPORARY TABLE temp_users (
                                  SELECT
  
                                  c.id as contactId,
                                  c.first_name as contactName,
                                  c.email_address as contactEmailAddress,
                                  sl.id as subscriberListId,
                                  sl.name as subscriberListName, 
                                  sl.display_name as subscriberListDisplayName,
                                  sl.from_email_address,&lt;br/&gt;
                                  sl.opt_in_msg_subject as subject,
                                  sl.opt_in_msg_content as content,
                                  sl.opt_in_msg_signature as signature,
                                  csl.identifier
                                  FROM contact c
  
                                            INNER JOIN contact_subscriber_list csl ON csl.contact_id=c.id
                                            INNER JOIN subscriber_list sl ON sl.id=csl.sub_list_id
                                            INNER JOIN contact_sub_list_status csls ON csls.id=csl.status_id  where csls.description='initialized');
  END
  </code></pre>
  
  <p>but now i want to update that resultset.so i create a temporary table(temp_users) and i need to do some update to some column in temporary table(temp_users).but i cant understand how can i iterate over that and update the temp_table.i tried using while loop and dont know  how it apply(while loop).can i do this using while loop? and how can i apply it?need help</p>
  
  <p>regards<br/>
  kosala</p>