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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:54:22+00:00 2026-05-24T04:54:22+00:00

I have the following problem. Table labels include the record labels. Table albums include

  • 0

I have the following “problem”.

Table “labels” include the record labels.
Table “albums” include the albums, and a field with the labels of the album in question, formatted like “1,4,9”.

Now I want to get the label names along with the album name, release year, artist etc. I have everything but the label names figured out! It seems like FIND_IN_SET won’t work with commas… Can you guys please help me, or do I have to use a secondary query for the label names?

Thank you!

  • 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-24T04:54:22+00:00Added an answer on May 24, 2026 at 4:54 am

    The problem is that your schema is wrong. You do not store the relationship between albums and labels as a comma-separated list. Any column’s value should always be atomic (single valued).

    The way to store a many-to-many relationship like this is with a new table.

    CREATE TABLE artist_label (artist_id int, label_id int, primary key (artist_id, label_id));
    INSERT INTO artist_label (1, 1);
    INSERT INTO artist_label (1, 4);
    INSERT INTO artist_label (1, 9);
    

    Now retrieving the artist and their label info at the same time is easy.

    SELECT
      artist.*,
      label.*
    FROM
      artist
    INNER JOIN
      artist_label
    ON
      artist_label.artist_id = artist.id
    INNER JOIN
      label
    ON
      label.id = artist_label.label_id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem in an Excel table. I want to have the
I have the following problem. I have a table with a few hundred thousand
I'm new to wicket and stuck with the following problem: I have a table
The problem is the following, I have a table of friendships in my database,
I have the following problem I have 3 table (all of the are used
I have the following problem. My table, say tab1, has name column as follows
I have the following problem with an NHibernate query. one table LearnerDocuments : LearnerNumber
I've reduced my problem (table layout algorithm) to the following problem: Imagine I have
I have the following problem: I have an account table and an entries for
I have the following problem: in a database table are Sales recorded. One of

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.