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

17 lines
409 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`saleGroup_add`(vSectorFk INT,vTicketFk INT)
BEGIN
/**
* Añade un nuevo registro a la tabla y devuelve su id.
*
* @param vSectorFk Identificador de vn.sector
*/
2024-01-25 16:33:54 +00:00
INSERT INTO vn.saleGroup
SET `userFk` = account.myUser_getId(),
`sectorFk` = vSectorFk,
`ticketFk` = vTicketFk;
SELECT LAST_INSERT_ID();
END$$
DELIMITER ;