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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:51:43+00:00 2026-06-03T01:51:43+00:00

Assuming I have 3 tables: People ————- PID | NAME ————- 1 Bob 2

  • 0

Assuming I have 3 tables:

People
-------------
PID   |  NAME
-------------
1       Bob
2       Garry
3       Alex
4       Peter
5       Victor

Tasks
-------------
TID   |  TASK
-------------
1       Work
2       Work Hard
3       Work Harder

And table that assigns tasks to people

Assigns
-------------
PID   |  TID
-------------
1       2
2       1
4       3

Question:
How do I select People who were not assigned to any task?

  • 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-03T01:51:45+00:00Added an answer on June 3, 2026 at 1:51 am

    The LEFT JOIN approach will work, but here are two more approaches that you might find easier to read:

    1. NOT IN

    SELECT NAME
    FROM People
    WHERE PID NOT IN
    (
        SELECT PID
        FROM Assigns
    )
    

    2. NOT EXISTS

    SELECT NAME
    FROM People
    WHERE NOT EXISTS
    (
        SELECT *
        FROM Assigns
        WHERE People.PID = Assigns.PID
    )
    

    Result

    Alex
    Victor
    

    Related

    • NOT IN vs. NOT EXISTS vs. LEFT JOIN / IS NULL: Oracle
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assuming three tables which map a many to many relationship. People 1 Bob 2
I have two tables that look like following: RELEASE TABLE name asin MATCHES TABLE
Assuming I have three tables : TableA (key, value) TableB (key, value) TableC (key,
Let's say I have two tables: Report Comment And assuming I have a database
I'm kinda stuck defining a Hibernate Entity: Assuming I have the following two tables
Assuming I have the tables student , club , and student_club : student {
Assuming I have 2 large tables with well over 10 Million Rows in each
Assuming that I have two tables, names and phones , and I want to
Assuming that I have 2 tables articles id title 1 Article 1 2 Article
So... assuming i have a database with three tables: Table clients Table data and

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.