• To get the answer information associated with the test id you pass to the procedure, you will need to join the tblAnswer to tblQuestion on the question ID, and use a WHERE clause to filter on tblQuestion.

    I'm not sure what information you want to pull from tblAnswer, but the basic form of the SELECT query would be as follows:

    SELECT *

    FROM tblAnswer A

    INNER JOIN tblTestQuestion Q

    ON Q.ID=A.questionID

    WHERE Q.testID=3 --You'd use the parameter here, instead of a hard-coded value, of course.

    Cheers!