0
Have the following Question below and I would like to know if there is a way to simplify the WHERE clause
SELECT
idMembro,
dataCadastro,
nome,
apelido,
dataNascimento,
telefone,
celular,
bairro,
endereco,
email,
sexo,
estadoCivil,
dataBatismo,
bloqueado,
batizadoFora,
usuario,
senha
FROM membros
WHERE
idMembro NOT IN (SELECT idMembro FROM pastores) &&
idMembro NOT IN (SELECT idResponsavel FROM redes) &&
idMembro NOT IN (SELECT idResponsavel FROM regioes) &&
idMembro NOT IN (SELECT idResponsavel FROM areas) &&
idMembro NOT IN (SELECT idResponsavel FROM setores) &&
idMembro NOT IN (SELECT idLider FROM celulas)
ORDER BY nome
UNION excludes repeat values? Can you tell me?
– Carlos Rocha
Yes, UNION holds only 1 of the repeated values, UNION ALL holds all
– Marciano Machado
Thank you" That’s what I need
– Carlos Rocha