want a sql query to get the second last scored student... student table consists of roll no and marks....
how do you keep track of marking?
select * from student order by MARKINGMOMENT desc limit 1,1
i think
Except if 2 students got the same score - how you gonna decide which one you want. Subquery takes care of equal scores of course
"SELECT * FROM student s INNER JOIN (SELECT mark FROM student ORDER BY mark DESC LIMIT 1,1) AS t ON(s.mark=t.mark)";
thank u very much