MySQL Forums
Forum List  »  Italian

problema ridondanza imprevista Foreign KEY
Posted by: marco marti
Date: April 02, 2019 02:00AM

buongiorno il mio problema è questo:
ho una tabella ALLIEVO:
ID NOME esameID
int PK V(255) int FK reference ESAME.idEsame
1 Marco 2

ho una tabella ESAME:
IdESAME DATA
int PK data
1 2019-04-02
2 2019-04-15

query:

select nome, data from allievo, esame where esameID = 2;

perchè l'output da:

NOME DATA
marco 2019-04-02
marco 2019-04-15

e non come mi aspetterei solo:
NOME DATA
marco 2019-04-15

che query dovrei impostare per ottenere il mio output? grazie..

Options: ReplyQuote


Subject
Views
Written By
Posted
problema ridondanza imprevista Foreign KEY
154
April 02, 2019 02:00AM


Sorry, only registered users may post in this forum.

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.