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 8852003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:17:41+00:00 2026-06-14T13:17:41+00:00

please, is it possible to access single values in varray? Something like newVariable :=

  • 0

please, is it possible to access single values in varray?

Something like newVariable := myArray(value2) –> this will assign second value in array into new varible…

I also need something like this:

FOR CYCLE...
x++
newVariable(x) := myArray(value(x))
END FOR CYCLE 

Is it possible?

Thx, I’m student of information technologies and I’m trying to solve this. Don’t know where to look…

  • 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-14T13:17:42+00:00Added an answer on June 14, 2026 at 1:17 pm

    According to the oracle online documentation, the varray type is the type among other collection types in PL/SQL used for creating array like objects(I mean array as we understand it in other classic programming languages such as C, Java, etc.). Except that the length can varry from 0 to a maximum size specified during its definition.

    Here is an example:

    DECLARE
        SUBTYPE country_ty IS VARCHAR2(50);
        TYPE countries_varr_ty IS VARRAY(10) OF country_ty;
        l_varr_countries countries_varr_ty :=
            countries_varr_ty
            (
                'Iran', 'France', 'United Kingdom', 'United States', 'Germany',
                'Spain', 'Canada', 'Australia', 'South Africa', 'Afganistan'
            );
        l_country country_ty;
    BEGIN
        FOR counter IN l_varr_countries.FIRST .. l_varr_countries.LAST
        LOOP
            l_country := l_varr_countries(counter);
            DBMS_OUTPUT.PUT_LINE('The current value in the array is: ' 
                || l_country);
        END LOOP;
    END;
    /
    

    For more information on varrays you can refer to the following link:

    http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CHDEIJHD

    Regards,

    Dariyoosh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to pass the coloumn name also like a variable.Please edit this
Please look at this picture: Is it possible to find per-column sum for all
Possible Duplicate: How does this CSS triangle shape work? Please help me i need
I am not sure if this is possible, so please let me know. I
Is it possible to access Google Chrome's cache from within an extension? I'd like
can anyone please tell me in android, is it possible to access the list
Possible Duplicate: Why can't I access a property of an integer with a single
Is this possible? I had troubles with SVN clients not being able to access
I want to programmatically read the contents of the /etc directory. If possible please
Please tell me if it is possible to do the following: create an instance

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.