title: Fetch last inserted ID form stored procedure in MySQL
body: <p><strong>How to fetch last inserted id?</strong></p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_insertzonemsg`
  
     (IN User_Id INT(10),
      IN zid INT(10),
      IN update_titles VARCHAR(50),
      IN textarea1s TEXT,
      IN filupload1s TEXT,
      IN audio1s VARCHAR(100),
      OUT out_id INT(10))
          BEGIN
          INSERT INTO zone_message_master
          **(user_id,ZoneID,update_title,textarea1,filupload1,
          audio1,LastUpdate)**
          VALUE
          **(User_Id,zid,update_titles,textarea1s,
          filupload1s,audio1s,NOW());**
  
  SELECT **id** as **out_id**
  FROM **zone_message_master** LAST_INSERT_ID();
  END$$
  </code></pre>
  
  <p>I need to return last inserted ID as <code>out_id</code> form the Table <code>zone_message_master</code>?</p>