16 lines
310 B
SQL
16 lines
310 B
SQL
DELIMITER $$
|
|
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 ;
|