salix/db/routines/vn/functions/ticketWarehouseGet.sql

16 lines
310 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`ticketWarehouseGet`(vTicketFk INT)
RETURNS int(11)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE vWarehouseFk INT;
SELECT warehouseFk INTO vWarehouseFk
FROM ticket
WHERE id = vTicketFk;
RETURN vWarehouseFk;
END$$
DELIMITER ;