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

17 lines
344 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`prepareClientList`()
BEGIN
/*
* Require la tabla tmp.ticket(id,clientFk)
*/
DROP TEMPORARY TABLE IF EXISTS tmp.client;
CREATE TEMPORARY TABLE tmp.client
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT DISTINCT clientFk id
FROM tmp.ticket;
END$$
DELIMITER ;