I have a problem with my SQL procedure. MySQLWorkbench advises me to skip the "end" before my first SET, but not for the second. I do not know why.
DELIMITER $ drop procedure if exists pay10percent$ create procedure pay10percent(IN montant decimal(9,2),IN idResa INT(5)) begin declare circuitid INT; SET circuitid = ( SELECT IDCIRCUIT FROM RESERVATION WHERE IDRESERVATION=idResa ); declare montantCircuit decimal(9,2); SET montantCircuit = (SELECT PRIX FROM CIRCUIT WHERE IDCIRCUIT=circuitid); end; $ DELIMITER ;
Thanks.
source share