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

  • Home
  • SEARCH
  • 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 855153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:02:03+00:00 2026-05-15T08:02:03+00:00

I want to store more than one Email IDs in the Email id column

  • 0

I want to store more than one Email IDs in the Email id column of a table, as a multivalued attribute. How can I do this in oracle?

  • 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-15T08:02:03+00:00Added an answer on May 15, 2026 at 8:02 am

    The traditional, relational way of doing this would be with a child heap table:

    create table emails 
        (id number
         , email_address varchar2(254)
         , constraint em_t23_fk foreign key (id)
                      references t23 (id)
                      )
    /
    

    However, you are hinting at a nested table:

    create type email_t as object
        (email_address varchar2(254))
    /
    
    create type email_nt as table of email_t
    /
    alter table t23
        add emails email_nt
        nested table emails store as emails_table
    /
    

    Here’s how it works:

    SQL> update t23
      2  set emails = email_nt (email_t('sam_i_am@example.com')
      3                          , email_t('green_eggs_n_ham@yahoo.co.uk'))
      4  where id = 222
      5  /
    
    1 row updated.
    
    SQL> select * from t23
      2  where id = 222
      3  /
    
            ID NAME                           DOB
    ---------- ------------------------------ ---------
    EMAILS(EMAIL_ADDRESS)
    ----------------------------------------------------------------------------------
           222 Sam-I-Am                       06-AUG-02
    EMAIL_NT(EMAIL_T('sam_i_am@example.com'), EMAIL_T('green_eggs_n_ham@yahoo.co.uk'))
    
    
    SQL>
    

    Edit

    The solution with VARRAY is basically the same:

    SQL> alter table t23
      2      drop column emails
      3  /
    
    Table altered.
    
    SQL> create type email_va as varray(5) of varchar2(254)
      2  /
    
    Type created.
    
    SQL> alter table t23
      2      add emails email_va
      3  /
    
    Table altered.
    
    SQL> update t23
      2  set emails = email_va ('sam_i_am@example.com'
      3                        , 'green_eggs_n_ham@yahoo.co.uk')
      4  where id = 222
      5  /
    
    1 row updated.
    
    SQL> select t23.name
      2         , e.*
      3  from t23
      4       , table (t23.emails) e
      5  where t23.id = 222
      6  /
    
    NAME                           COLUMN_VALUE
    ------------------------------ ---------------------------------
    Sam-I-Am                       sam_i_am@example.com
    Sam-I-Am                       green_eggs_n_ham@yahoo.co.uk
    
    SQL>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to store more than one value in database column. if yes
Can any body please let me know if more than one database connection at
More than one year ago I submitted an app. Now I want to update
In the quest to make my data more accessible, I want to store my
I want to store a user setting(language). so i can get the corresponding resources
In C#, how can I store a collection of values so if I want
I have more than one webbrowser controls on my program, and it seams they
Is it possible have more than one profile template? I'm working on an internal
The users of my web application may have more than one browser window open
I want to store images into sql using c# application. So I have this

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.