I have a table tblA with ID fooID and table tblB with ID fooID.
This is a 1:N relationship, for this particular query I want to JOIN table A to B but only SELECT the first record for each join in tblB.
So
tblA
fooID | ... | ...
a
b
c
d
tblB
fooID | foovalue
a 'apple'
a 'orange'
b 'pear'
b 'banana'
So my SELECT would return
a | apple
b | pear
This is a 1:N relationship, for this particular query I want to JOIN table A to B but only SELECT the first record for each join in tblB.
So
tblA
fooID | ... | ...
a
b
c
d
tblB
fooID | foovalue
a 'apple'
a 'orange'
b 'pear'
b 'banana'
So my SELECT would return
a | apple
b | pear