FIND SECOND LARGEST FROM SQL TABLE

Let us consider a table have three fields say Id,Mark,and name.and table name is student.

For getting second largest mark from student table you can use following sql query.

Step 1: get top 2 marks from student table in descending order

Select top 2 mark from student order by Mark desc

Step 2: find minimum from the inner query

Select min(mark) from (inner query)

So the final query will be

Select min(mark) from (select top 2 mark from student order by Mark desc)a