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

19 lines
441 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` PROCEDURE `vn`.`shelvingLog_get`(shelvingFk VARCHAR(10))
BEGIN
/* Lista el log de un carro
*
* @param shelvingFk matrícula del carro
*
*/
SELECT originFk, name, creationDate, description
FROM shelvingLog sl
JOIN account.user u ON u.id = sl.userFk
WHERE sl.originFk = shelvingFk COLLATE utf8_general_ci
ORDER BY creationDate DESC;
END$$
DELIMITER ;