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

17 lines
403 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`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 ;