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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:36:25+00:00 2026-06-10T19:36:25+00:00

I have a column in a table that contains data like: column: col_name row

  • 0

I have a column in a table that contains data like:

column: col_name
 row 1: 3451,3547,234,456,6487,2341,7856,546,76
 row 2: 4746,234,6757,234,7657,6346,563
 row 3: 546,7467,4562,456,234
 row 4: 563,3246,5641,4637,234,7854,567,577

I would like to be able to select a record based on whether it has a certain number in it.

E.g. as 234 appears in all rows, it selects them all; 563 appears in 2 and so on.
This does not work:

select col_name from table_name where col_name like '%234%';

which I think may be because I’m confusing how I should be selecting columns and rows, but I’m at a blank for what else could work, help appreciated!

Edit: I think I’m confusing myself and some of the repliers (sorry, folks). I’m not trying to find the column name that matches my query, I’m trying to find data in the column that matches my query, aka data in the rows. Some of the answers seem geared towards an unknown column name, but I know which column I’m using.

This is what I would expect to get if I search for a row with 563 in it:

4746,234,6757,234,7657,6346,563      (row 2)
563,3246,5641,4637,234,7854,567,577  (row 4)

If I search for it using all the values in the query like so:

select col_name from table_name where col_name = '4746,234,6757,234,7657,6346,563';

then it will return the row:

4746,234,6757,234,7657,6346,563      (row 2)

but I only want to be able to search for it using one number, not several, as they represent different things.

  • 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-10T19:36:27+00:00Added an answer on June 10, 2026 at 7:36 pm

    You can do this using FIND_IN_SET:

    SELECT col_name 
    FROM table_name 
    WHERE FIND_IN_SET('563', col_name);
    

    Example: SQLFiddle

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

Sidebar

Related Questions

Suppose I have a table that contains valid data. I would like to modify
I have a table that contains a column that is XML data type. I
I have an Oracle table that contains data on the column ORG_KEY . I
I have a fact table that contains some finance data. There is a column
I have one table that has Image Data type column, that column contains Pdf
I have a varchar(100) column in a table that contains a mix of integers
I have a table that contains an Id column as a primary key. There
I have a table that contains records with a column indicates the Date. Given
You have a table table1 that contains id column, that is int(11), not null,
I have a mysql table that has 2 columns - Column 1 contains a

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.