16 lines
312 B
SQL
16 lines
312 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`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 ;
|