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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:55:21+00:00 2026-06-10T15:55:21+00:00

I have five columns and i want to search data from five columns but

  • 0

I have five columns and i want to search data from five columns but column values can be more than 5, its not fixed.

Example

column name

first-name,last-name,subject,result,grade.

I want to search more-than one value using sqlite.(first-name can be a,b,c,d)

How to achieve this??

Any help would be appreciated.

  • 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-10T15:55:22+00:00Added an answer on June 10, 2026 at 3:55 pm

    Using IN keyword in SQLite would allow you perform search with a set of multiple values. For example:

    SELECT * FROM table WHERE first-name IN ('a', 'b', 'c', 'd');
    

    Now what you can do is to build an input (searchable words) parameter using any loop and replace it in the IN brackets.

    For example:

    String names = "'a', 'b', 'c', 'd'";      /* build it through loop */
    
    Cursor c = db.rawQuery("SELECT * FROM table WHERE first-name IN (?)",
                  new String[]{names});
    

    With multiple columns:

    String names = "'a', 'b', 'c', 'd'";      /* build it through loop */
    
    Cursor c = db.rawQuery("SELECT * FROM table WHERE first-name IN (?)
             OR last-name IN (?) OR subject IN (?) OR result IN (?) OR grade IN (?)",
             new String[]{names, names, names, names, names});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an .csv with four or five columns of data for webstats. I
I want to insert a row of data into a table with five columns
I have a text file with five columns. First column has year(2011 to 2040),
I have a five tables and their respective column university - id_university (pk) -
I have Five check boxes Search All Template 1 Template 2 Template 3 Template
I have five tables that are fairly similar in structure but different enough that
So I have these five buttons that I want to be always present in
I am trying to build a table in latex where five columns have a
I have a simple mysql table with five columns: id: auto_increment (primary) id_symbol: INT(4)
I have a table with data : id one two three four five six

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.