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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:39:03+00:00 2026-06-16T07:39:03+00:00

I have two tables A and B. In table A, it contains two cols,

  • 0

I have two tables A and B.
In table A, it contains two cols, A1,A2 where A1 is primary key
In table B, one of the column, let says B2, store an array of value in col A1
I want to reference every element in this array to col A1 in table A. Is this possbile

For example,
table A
ID|name|value
1|OTZ|10
2|hello world 10
3|apple|2
4|orange|5

table B
id|array
1|1,2
2|3,4
3|1,4

How can I reference those value in col array to table A?

  • 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-16T07:39:04+00:00Added an answer on June 16, 2026 at 7:39 am

    As you asked for, a short answer – this is how you solve a “many to many” relation between two tables.
    Many to Many can also mean, that one entry in Table A has no connection to TABLE B at all, or it has hundres (and vice verca)

    If you got

    TABLE A
    id INT PRIMARY KEY,
    a_description TEXT NOT NULL
    
    TABLE B
    id INT PRIMARY KEY,
    b_description TEXT NOT NULL
    

    if you want to save a relation between those two, you will need a mapping-table, most of the time called TABLEA2B (or something like that) which holds at minimum the both primary key of those tables as a combined primary key (so that the same combination is not allowed twice)

    TABLE A2B
    A_id INT,
    B_id INT,
     PRIMARY KEY (`A_id`, `B_id`)
    CONSTRAINT...
    

    A article about that with an UML diagram and complete (working) SQL Example codes can be found here: http://sqlrelationship.com/many-to-many-relationship/

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

Sidebar

Related Questions

I have two tables. One table contains words. Other table contains points. table words:
I have two tables; A and B. Table A contains a column of GUIDs.
What I have is two tables inside of a mysql database. One table contains
I have two tables - `employee` and `department`. 1. `employee` table contains column id,employee
I have a one to many relationship between two tables. The many table contains
I have two tables. One contains default data for 3 columns, (value is 1
I have two db tables. One table contains Forecast data. The second table contains
I have two tables made in access. One table (Owner) contains: ownerID , name
I have two tables. One table contains comments on posts, another contains commenter information
I have two tables. One table contains information about Assets, another Table about their

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.