MySQL Forums
Forum List  »  Italian

Query join tra 3 tabelle
Posted by: Giuliano Rossi
Date: February 15, 2016 08:44AM

Ciao a tutti,

ho tre tabelle:

A:
Campo0
Campo1
Campo2
campo3
Campo4

B:
Campo1
Campo2

C:
Campo2
Campo3
Campo4


devo trovare tutti i record della tabella A di cui la tupla "Campo1, Campo2, Campo3, Campo4" non è contenuta nel join sul campo2 tra la tabella C e la B .

ho provato con questa query ma è sintatticamente errata:

SELECT s.Campo1,s.Campo2,s.team,s.campo3, s.Campo4
from A s where ((Campo1,Campo2,Campo3,Campo4) in
(select (b.Campo1, a.Campo2, a.Campo3, a.Campo4) from C a
join B b on a.Campo2=b.Campo2));

mi restituisce l'errore:
Code: 1241. Operand should contain 1 column(s)


qualcuno può aiutarami con qualche dritta?
Grazie

Options: ReplyQuote


Subject
Views
Written By
Posted
Query join tra 3 tabelle
1938
February 15, 2016 08:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.