Saturday, 24 December 2011

Select Second Maximum From a Table in Sql

Q.Find Second Maximum From a Table in Sql

select max(duration) from course where duration<(select max(duration) from course)

OR



select min(duration) from course where duration in(select top 2 duration from course)

No comments:

Post a Comment