私はこのような列を持つ2つのテーブルがあります。MySQLのサブクエリ(またはUNION?)
Table1
testID username topic information totalTime
Table2
questionID testID question choices answers
を、私は同じtestID
からで表1からpartiular testID
と質問の番号NUMBERでのテストのためのすべての列を選択したいと思います表2、結果のテーブルは次のようでなければならないので:
testID username topic information totalTime questionCount
テストID & questionIDは、主キーです。
このクエリはどのように形成できますか?ありがとう。
まだあなた自身で試しましたか? – Bojangles