I have a mysql procedure that it doesn´t work an IF condition with AND. I'm not sure what is the correct syntax.
CREATE PROCEDURE insere_orcamento(
IN ida VARCHAR(10),
IN volta VARCHAR(10),
OUT result INT
)
BEGIN
IF (ida='sim' AND volta=NULL) THEN
SET result = 50;
ELSEIF (ida=NULL AND volta='sim') THEN
SET result = 51;
END IF;
END
Aucun commentaire:
Enregistrer un commentaire