My tables are :
studens_exam_answers_tbl
----------------------------------------------------
exam_id | question_id | student_id | student_answer
----------------------------------------------------
10 1 6 1
10 2 6 4
10 3 6 3
10 4 6 0
10 5 6 5
10 1 5 1
10 2 5 2
10 3 5 2
10 4 5 5
10 5 5 5
question_poll__tbl
--------------------------------------------------------------------------------
question_id | question | option_1 | option_2 | ....| option_5 |correct_answer
--------------------------------------------------------------------------------
1 .... .... .... ... .... 5
2 .... .... .... ... .... 2
3 .... .... .... ... .... 3
4 .... .... .... ... .... 4
5 .... .... .... ... .... 1
I want to match student answers with correct answers with sql. If students answer is correct 'it is true' else 'false'. if student_answer is 0 'empty'.
How can i do it?