I have two tables with TEAM
other MATCH_DETAILS
. The TEAM
table has the id
column and is the primary key. I made two relationships from the TEAM
table to MATCH_DETAILS
. In MATCH_DETAILS
assumed as foreign key team_id
and team_id1
.
With the following query :
SELECT
team_name, team_id1, Umpire_name,
playermatch_name, score_id
FROM
Match_details m, Team t,
Umpire u, player_match p, Score s
WHERE m.TEAM_TEAM_ID = t.TEAM_ID
and m.TEAM_TEAM_ID1 = m.TEAM_TEAM_ID1
and m.UMPIRE_UMPIRE_ID = u.UMPIRE_ID
and p.Match_details_MATCH_ID = m.match_id
and s.Match_details_MATCH_ID = m.match_id;
Returns the following:
Chelsea has as id
number 1 id
number 2 in column team_id1
corresponds to liverpool
. what I want is to appear Liverpool
and not the id
that corresponds.