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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:08:40+00:00 2026-05-16T23:08:40+00:00

The table consists of columns column_1, column_2, column_3. Given the set of string values

  • 0

The table consists of columns column_1, column_2, column_3.

Given the set of string values (string1, string2,… string 10) I have to create a query to return all rows which contain string1 or string2 or … or string10 in column_1 or in column_2.

I would appreciate if anyone suggested a good way to write an appropriate query statement for a given problem.

At first I created a statement

"SELECT .... FROM ... WHERE column_1 = string1 OR column_2 = string1 OR column_1 = string2 OR column_2 = string2 OR ... OR column_2 = string10"

but this way the query is very long although a method could be created to compose such query.

  • 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-16T23:08:41+00:00Added an answer on May 16, 2026 at 11:08 pm
    SELECT
        ...
    FROM
        ...
    WHERE
        column_1 in (string1, string2...string10)
        OR column_2 in (string1, string2...string10)
    

    I noticed you said contain but you’re actually testing for equality, these are 2 different things and the query is totally different you really meant contain.

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

Sidebar

Related Questions

I have a picture table which consists for users pictures Table Name:picture Columns: picture_id
I have a table with a lot of columns, and each column consists of
I have a table of Employees which consists of two columns : Employee and
I have a table, each row consists of 7 columns, and in the form
I have a MS access database. In that, one table consists of questions and
i have a table which consists of student details like roll no, Name, age.
I have two table Employee and Salary table, salary consists Salary of employee in
I have an tblEmployeeProfile & a tblPersonnel. tblPersonnel is an HR table, that consists
An Excel table consists of two columns (e.g., A1:B5): 0 10 1 20 3
The table consists of columns calling_party and called_party and the record describes the connection

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.