salix/db/routines/vn2008/procedures/prepare_client_list.sql

12 lines
316 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn2008`.`prepare_client_list`()
BEGIN
DROP TEMPORARY TABLE IF EXISTS tmp.client_list;
CREATE TEMPORARY TABLE tmp.client_list
(PRIMARY KEY (Id_Cliente))
ENGINE = MEMORY
SELECT DISTINCT Id_Cliente
FROM tmp.ticket_list;
END$$
DELIMITER ;