title: Multiple Updates on difderent tables in mysql (Stored Pocedure)
body: <p>I'm trying to make multiple updates on different tables in an stored procedure in MYSQL. But if one of these updates doesn't find the ID it will make a warnning or error.</p>
  
  <p>So I thought to use IF ELSE but I don't know how to make it.</p>
  
  <p>this is an example of the code in an stored procedure</p>
  
  <pre><code>be is an entrie parameter.
         update table1 set status = 2 where id_be = be;
         update table2 set status = 2 where id_be = be; 
         update table3 set status = 2 where id_be = be;
         update table4 set status = 2 where id_be = be;
         update table5 set status = 2 where id_be = be;
         update table6 set status = 2 where id_be = be;
         update table7 set status = 2 where id_be = be;
         update table8 set status = 2 where id_be = be;
         update table9 set status = 2 where id_be = be;
  </code></pre>
  
  <p>So, I need if the first update is successfull or true, leave de stored procedure if not,  continue to the anotherone.</p>
  
  <p>I hope you can help me. Thanks!!!</p>