salix/db/routines/vn/procedures/makeNewItem.sql

17 lines
304 B
MySQL
Raw Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`makeNewItem`()
BEGIN
DECLARE newItemFk INT;
SELECT getNewItemId() INTO newItemFk;
INSERT INTO item(id,name,typeFk,originFk)
SELECT newItemFk, 'Nuevo artículo', 78,39;
SELECT newItemFk;
END$$
DELIMITER ;