salix/db/routines/srt/procedures/buffer_getExpCount.sql

15 lines
393 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`buffer_getExpCount`(IN vBufferFk INT, OUT vExpCount INT)
BEGIN
/* Devuelve el número de expediciones de un buffer
*
* @param vBufferFk Identificador de srt.buffer
* @param vExpCount Número de expediciones
*/
SELECT COUNT(*)
INTO vExpCount
FROM srt.expedition
WHERE bufferFk = vBufferFk;
END$$
DELIMITER ;