SELECT B.ID PIDS,A.ID,A.EXAM_SCORE FROM EXAM_PARPERANDANSWER B
LEFT JOIN EXAM_LIST A ON A.ID=B.EXAMID
WHERE A.EXAM_SCORE=1 order by rand() fetch first 10 rows only
LEFT JOIN EXAM_LIST A ON A.ID=B.EXAMID
WHERE A.EXAM_SCORE=1 order by rand() fetch first 10 rows only