salix/db/routines/vn2008/procedures/proc_start.sql

14 lines
278 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn2008`.`proc_start`(IN v_proc_id INT)
BEGIN
INSERT INTO stat(proc_id) VALUES(v_proc_id);
DROP TEMPORARY TABLE IF EXISTS lastid;
CREATE TEMPORARY TABLE lastid
SELECT last_insert_id() id;
END$$
DELIMITER ;