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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:12:40+00:00 2026-05-11T19:12:40+00:00

how do I get the fields of a column that’s without a match in

  • 0

how do I get the fields of a column that’s without a match in another column?

I tried:

SELECT table1.page_title 
FROM table1, table2 
WHERE table1.page_title != table2.page_title

It produces a lot of duplicate fields so I did a:

SELECT DISTINCT table1.page_title 
FROM table1, table2 
WHERE table1.page_title != table2.page_title

but it just hangs.

Any help would be greatly appreciated, thanks!

P.S.
I’m doing this so I could create an exclude list for mediawiki’s MWDumper tool. I need it so that when I import the outputted sql, my current wiki entries will not be overwritten.

EDIT:
Yes they’re 2 different tables. Each has about 70,000+ records
Also why are my queries slow? I’d appreciate it if someone could clarify so I could learn why 🙂 Thanks again!

  • 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-11T19:12:40+00:00Added an answer on May 11, 2026 at 7:12 pm

    Are a and b different tables, both having a “page_title” column?

    If so, try this:

    SELECT DISTINCT page_title FROM a
    WHERE page_title NOT IN (SELECT page_title FROM b)
    

    If all you’re interested in is removing duplicates (if you only have one table), then there are several ways to do it, two of which are:

    SELECT DISTINCT page_title FROM a
    

    or

    SELECT page_title FROM a
    GROUP BY page_title
    

    The GROUP BY option is stronger albeit slower – you can add a HAVING clause to choose only those titles that appear e.g. more than twice:

    SELECT page_title FROM a
    GROUP BY page_title
    HAVING COUNT(page_title) > 2
    

    Hope that helps

    (Thanks Aaron F for the comment)

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

Sidebar

Related Questions

I need to get the biggest value from two fields: SELECT MAX(field1), MAX(field2) Now,
I have a class with like 20 fields which get populated from SQL database
Getting header fields from a URLConnection doesn't get session cookies for me. When I
I have a Column(Fields) that contain multiple values for each entity (One to Many).
Is there a way to get a column indicating the number of NULL fields
When using PowerShell to extract information from TFS, I find that I can get
I have several tables in my database that have read-only fields that get set
I'm trying to get column names from a table. I want to supply the
I have an NSTableView that has one column of editable fields. Cell editing works
I need to copy a set of data from one table to another that

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.