我需要获得
question
表和answer
表 TOGETHER 。这是我的表格的样子:
question
qid问题ans1 ans2 ans3 ans4
answer
ans_id answerAry
我想要的是:
问题,ans1,ans2,ans3,ans4和answerAry在哪里ans_id =:id
答案 0 :(得分:0)
这是您想要的吗?
select q.*,
(select a.answerAry from answer a where a.ans_id = :id) as answerAry
from question q;