Skip to content

Instantly share code, notes, and snippets.

View leolas95's full-sized avatar
🏠
Working from home

Leonardo Guedez leolas95

🏠
Working from home
View GitHub Profile
@leolas95
leolas95 / intercambio.sql
Last active November 7, 2017 19:50
Archivos .sql para el proyecto
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