PL/SQL (MOSC)

MOSC Banner

Returning multiple values from a PL/SQL FUNCTION.

in PL/SQL (MOSC) 3 commentsAnswered ✓

Suppose I have a table XX_TEST which has two columns ID(number) and NAME(varchar2(20))

It has following values:-

ID  NAME

1 RJ

1 NJ

2 AJ

2 PJ

Now I want to create a PL/SQL FUNCTION which has 1 parameter say P_ID.

where if I pass P_ID value as 1 then it should return values as RJ and NJ.

and if I pass P_ID value as 2 it should return AJ and PJ. 


Kindly suggest.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center