This is a SQL question
I have two tables I need to join together, using the inner join syntax. One named Entry, and the other named prize. I need to list the event
You should use alias to avoid ambiguity
select
e.event_id,
e.horse_id,
e.place,
p.Money
from ENTRY e
join PRIZE p on p.event_id = e.event_id
SELECT e.Event_id, e.Horse_id, e.place, p.money
FROM ENTRY e join Prize p
ON e.Event_id = p.Event_id
where e.place = p.place;
The e and p are used as aliases for the tables to avoid unreadable sql because of long table names.
using the e. or p. you will select the field for that table because it is possible that both tables have a field with the same name so there will be issues when executing the statement
I added the e.place = p.place because if you don't you would be getting the results for every place for each event matched with every prize
for example you would get Event 1 horse 1 place 1 prize 1 event 1 horse 1 place 1 prize 2 Event 1 horse 1 place 1 prize 3 event 1 horse 1 place 1 prize 4 etc... until you get every prize and this would be the same for every entry, assuming the event for the prize equals the event for the entry