我有两个表(问答表)。
<><> 问 题>
id question
1 what is your name?
2 how old are you?
<>Answer>
id answer questionid
1 john 1
2 smith 1
3 waiyan 1
4 20 2
5 21 2
6 22 2
在我选定记录时,结果如下。
SELECT * FROM question INNER JOIN answer on questionid= question.id
what is your name?
john
what is your name?
smith
what is your name?
waiyan
how old are you?
20
how old are you?
21
how old are you?
22
I want to remove duplicate question statement. I want to get following.
What is your name?
John
smith
waiyan
how old are you?
20
21
22
Please Someone help me how to write it. I am really beginner for mysql. So sorry for my bad english usage.