I'm doing this trigger to check if dados_id
and referente_obs
exists in the bank table
But it returns this error:
1241 - Operand should contain 1 column (s);
BEGIN
IF (NEW.id_dados and NEW.referente_obs) not in (
select A.id_dados,A.referente_obs
From banco as A
where (NEW.id_dados = A.id_dados and NEW.referente_obs = A.referente_obs)
) THEN
CALL 'Insert Not Allowed.';
END IF;
END