Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to find the second largest in a pl/sql table

kumar73Oct 5 2010 — edited Oct 21 2010
Hello Friends,

I want to find the the first and second maximum elements in a pl/sql table.

here 's the code ..

DECLARE
TYPE max_earnings_type IS TABLE OF NUMBER;
max_earnings_tab max_earnings_type := max_earnings_type();
v_count number := 0;
v_max_earnings number ;


Can any one provide me how to find the first max and second maximum in the given table type.

appreciate your help.

thanks/kumar

Edited by: kumar73 on Oct 21, 2010 9:42 AM
This post has been answered by Solomon Yakobson on Oct 6 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2010
Added on Oct 5 2010
16 comments
2,297 views