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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:26:25+00:00 2026-06-14T22:26:25+00:00

SQL newbie here, just learning how to do some basics. Working in SQLite, If

  • 0

SQL newbie here, just learning how to do some basics. Working in SQLite, If I have an array of conditions I can search for any matches using IN, like so:

SELECT * FROM people WHERE job_id IN (1,2,3)

In this contrived example, this would give me any people with job id 1, 2 or 3. However, in a different case, how could I make this an ALL condition? Ie. select people with job_id matching all terms in the array?

I think that in some dbs you can do this:

SELECT * FROM people WHERE job_id IN ALL (1,2,3)

But when I try this in SQLite I get syntax error near ALL. So, how do you do this in SQLite, and, for bonus points, is there a way to write this kind of query that would also be compatible with PostgreSQL?

  • 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-14T22:26:26+00:00Added an answer on June 14, 2026 at 10:26 pm
    SELECT columName          -- fetch only single column
    FROM people 
    WHERE job_id IN (1,2,3)
    GROUP BY job_id
    HAVING COUNT(*) = 3
    

    behind the GROUP BY and HAVING is to count all the number of records match by the job_id

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

Sidebar

Related Questions

I'm brand new to SQL Server 2008, and have some newbie questions about the
This is sort of SQL newbie question, I think, but here goes. I have
I'm a newbie to sql and am trying to follow this example here: http://net.tutsplus.com/tutorials/php/a-better-login-system/
I am newbie to SQL Joins. I have two tables Version Vid, VName, IsActive
I'm a newbie with SQL... Now I want to display some instances of AddrDistances
Dear All, please help me since I'm newbie in SQL Server. I have a
RoR/SQL newbie here. My datetime column ' deleted_at ' are all uninitialized. Running this
stackoverflow newbie here, so I'm hoping you can give me a warm welcoe by
Be gentle, I'm a SQL newbie. I have a table named autonumber_settings like this:
currently i'm studying MySQL, sorry for my newbie question. Here my question I have

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.