Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8554623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:55:31+00:00 2026-06-11T14:55:31+00:00

I have created a user type in oracle create or replace type my_array_list is

  • 0

I have created a user type in oracle

create or replace type my_array_list 
is
table of 
varchar2(100);

Now i have written a procedure which has a output parameter like this :

   type my_list_rec IS record
   (
      best_friends my_array_list,
      good_friends my_array_list
   );


   type my_list_array is table of my_list_rec;

  procedure friends_diff_prc(my_name in varchar2,
                                     my_friend_list_o   out my_list_array ,
                                     rc_o                  out number); 

Now i am calling this proc through my JAVA Class which is extending StoredProcedure.

// Declare output parameter
 declareParameter(new SqlOutParameter(
                PropertiesReader
                        .getPropertyValue(FRIENDSConstants.GET_FRIEND_LIST_OUT),
                OracleTypes.ARRAY,"MYDB.MY_ARRAY_LIST"));

But when i am calling a proc , i am getting

org.springframework.jdbc.BadSqlGrammarException:

Am i declaring an OUT Parameter correctly??
And how i can parse the contents of that output parameter?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:55:32+00:00Added an answer on June 11, 2026 at 2:55 pm

    Your example is strikingly confusing. You have purposefully named two types that are very different with very similar name:

    • my_array_list is a SQL type: a nested table of VARCHAR2
    • my_list_array is a PL/SQL type: a table of record of my_array_list

    PL/SQL and SQL types are physically very different. For example, PL/SQL types can’t be accessed directly through jdbc.

    Furthermore, the two types are logically very different: I can’t see how you can imagine to map the first type to the second. The second type is a collection of objects of the first type, you will never be able to swap the two types, ever.

    I suggest the following:

    1. don’t name types that are very different with confusingly similar name.
    2. create a wrapper procedure with SQL Objects around your PL/SQL procedure to be able to call it from jdbc.
    3. see this SO for an example of calling a procedure with a SQL table as an OUT parameter: Fetch Oracle table type from stored procedure using JDBC.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a oracle table called: create table InsertHere( generate_id varchar2(10), name varchar2(100) );
I have nested table xxx_nested_table in Oracle CREATE OR REPLACE TYPE xxx_tab AS TABLE
I have a user-defined type: create or replace type my_message_type as object (relatedid varchar2(50),
Suppose I have a user defined type: CREATE OR REPLACE TYPE TEST_TYPE AS OBJECT
I have written this package CREATE OR REPLACE PACKAGE CURVES AS type t_forecast_values is
Actually I have created a User defined table type in sql server 2008. Structure
So I have the following user defined type in my oracle database: CREATE OR
I have a content type Task, where we create task for ourself or user
I have created a user control (link) which has a label and a button.
I have created a user control (CheckedDirTree) that exposes a CheckedFolder property which in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.