I have student marks in a student table. I need second
highest mark .Then what will the query for this?

Answer Posted / poomanibe

with temptab as
(
select row_number() over(order by substring(marks,1,2)) as
rownum,* from Student
)
select * from temptab where rownum=1

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between for auto and for nested?

521


What is a table called, if it has neither cluster nor non-cluster index? What is it used for?

606


What is an example of a foreign key?

518


What is explicit cursors?

563


mention different types of relationships in the dbms?

515






What is difference between stored procedure and user defined function?

558


How to stop a loop early with break statements in ms sql server?

582


How many levels of sp nesting are possible?

561


What is 1nf 2nf?

564


Why union all is faster than union?

516


How we can compare two database data?

527


How do you implement session management in SQL Server mode?

566


How do I find the sql server database version?

537


How can I know what locks are running on which resource?

516


Mention the 3 ways to get a count of the number of records in a table.

560