select parent.* , child.* from table parent join table2 child on (parent.id=child.id) where parent.id = ?