This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delimiter // | |
create procedure hacer_intercambio(in groupid int, out a varchar(200), out b varchar(200)) | |
begin | |
drop table if exists temp1; | |
drop table if exists temp2; | |
-- Crea una tabla temporal para guardar los ids de los participantes | |
create temporary table temp1 as (select users.id from | |
users, participants, participates | |
where participates.participant_id = participants.id and | |
participants.user_id = users.id and |