如何获取最后插入的 id?
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$$
我需要以out_id
表格形式返回最后插入的 IDzone_message_master
吗?