DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`machine_getWorkerPlate`(vWorkerFk INT) BEGIN /** * Selecciona la matrĂ­cula del vehĂ­culo del workerfk * * @param vWorkerFk el id del trabajador */ SELECT m.plate FROM machine m JOIN machineWorker mw ON mw.machineFk = m.id WHERE mw.inTimed >= TIMESTAMPADD(HOUR , -12,util.VN_NOW()) AND ISNULL(mw.outTimed) AND mw.workerFk = vWorkerFk; END$$ DELIMITER ;