EXL Service interview question

Prime Number, While Loops, MySQL