How to do a select/join with where

Thanks for your advice. I do not know how to solve this:


Entity A
Field A1
Multi valued association to Entity B


Entity B
Field B1
Field AID (reference to A)

I want all records from table A, where B.B1 = 'abc'

This would be the SQL I´d use:
select * from table a 
join tbl b on a.ID = b.AID
where b.b1='abc'

select * from table a where exists
(select 1 from table b where and b.b1='abc')

The second form would return entities of type A. 
What would the first form return and how do I access the values?

Thank you!

Maybe this topic in documentation will help you?