2
Good, I have the following 3 tables:
SELECT *
FROM Cartao
INNER JOIN Registo
ON Registo.ID_Cartao=Cartao.ID_Cartao
INNER JOIN Clientes
ON Registo.ID_Cliente=Clientes.ID_Cliente
WHERE Clientes.ID_Cliente=Registo.ID_Cliente
AND Clientes.ID_Cliente=2
With this select I can see the cards that are registered with the client with ID 2. I would like to know which select to view the customer NOT REGISTERED cards with id 2
Thank you
Note that the condition expressed in the clause WHERE (Clients.Id_client=Registration.Id_client) is the same condition as the junction and therefore totally redundant and unnecessary.
– anonimo