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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:22:03+00:00 2026-05-13T16:22:03+00:00

I have the following statements in Oracle 11g: CREATE TYPE person AS OBJECT (

  • 0

I have the following statements in Oracle 11g:

CREATE TYPE person AS OBJECT (
    name VARCHAR2(10),
    age NUMBER
);

CREATE TYPE person_varray AS VARRAY(5) OF person;

CREATE TABLE people (
    somePeople person_varray
)

How can i select the name value for a person i.e.

SELECT somePeople(person(name)) FROM people

Thanks

  • 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-05-13T16:22:03+00:00Added an answer on May 13, 2026 at 4:22 pm

    I’m pretty sure that:

    1. What you’re doing isn’t what I’d be doing. It sort of completely violates relational principles, and you’re going to end up with an object/type system in Oracle that you might not be able to change once it’s been laid down. The best use I’ve seen for SQL TYPEs (not PL/SQL types) is basically being able to cast a ref cursor back for pipelined functions.

    2. You have to unnest the collection before you can query it relationally, like so:

      SELECT NAME FROM
      (SELECT SP.* FROM PEOPLE P, TABLE(P.SOME_PEOPLE) SP)

    That’ll give you all rows, because there’s nothing in your specifications (like a PERSON_ID attribute) to restrict the rows.

    The Oracle Application Developer’s Guide – Object Relational Features discusses all of this in much greater depth, with examples.

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

Sidebar

Related Questions

I have following statements in Oracle query window in VS2010, It does not show
I have come across the following stored procedure within an Oracle database: CREATE OR
I have used the following statements to get the current time. print $query executed
simple question :- i have the following simple if (..) statements :- if (foo
I have a little confusion in the following two statements. The below program is
I have following statement in one of the oracle SP: OPEN CUR_NUM FOR SELECT
I have a function defined inside an Oracle package: CREATE OR REPLACE PACKAGE BODY
I have the following query: SELECT wm_concat(DISTINCT NAME) as Methods FROM TPM_TRAININGPLAN JOIN TPM_DELIVERYMETHODS
I have the following table in an Oracle database: InvoiceNumber InvoiceDate InvoiceCorrelative ------------- -----------
I have the following oracle statement which is giving compilation errors. v_percent_deceased_households := CASE

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.