How to set a variable to the result of a stored procedure inside a Trigger MYSQL?
问题 I have a little problem here, I'm making a trigger for my DB work, but I don't know how to use a stored procedure inside a trigger, I want to save the result of the procedure in a variable and then use the variable later on an IF comparator, this is my code: DELIMITER @ CREATE TRIGGER insert_players AFTER INSERT ON players FOR EACH ROW BEGIN DECLARE A varchar(50); set A = CALL consult_sex(player_name); //I WANT SOMETHING LIKE THIS IF A != FEMALE THEN INSERT INTO males (id_player, player