SELECT "c".*, "d".* FROM cats as c, dogs as d INNER JOIN dogs d on d.cat_id = cats.id;