List:General Discussion« Previous MessageNext Message »
From:John Furlong Date:August 11 2009 8:52pm
Subject:How to compare 2 columns in different tables.
View as plain text  
I have about 120,000 organization names in table1 which I am trying to match against
75,000 organization names  in table2 and see if they are a perfect match, a partial match
or don't match at all.

I was looking at Natural Language Full Text Searches,
( and it seems to be
along the lines of what I'm looking for but not exactly. "By default, the
function performs a natural language search for a string against a text collection. A
collection is a set of one or more columns included in a FULLTEXT index. The search string
is given as the argument to AGAINST(). For each row in the table,
returns a relevance value; that is, a similarity measure between the search string and the
text in that row in the columns named in the

My question is, can the argument in AGAINST() refer to a column in another table or does
it have to be a specific string you are searching for? If  the MATCH() function won't
work, any suggestions on how else to compare against The columns
are defined as VARCHAR.

This is for MySQL 5.0, and the tables are MyISAM. They are fairly small temporary tables
created for one off comparison purposes, so performance is not a big consideration.


How to compare 2 columns in different tables.John Furlong11 Aug
  • Re: How to compare 2 columns in different tables.Mark Goodge15 Sep
    • Re: How to compare 2 columns in different tables.Arthur Fuller15 Sep
    • Re: How to compare 2 columns in different tables.Shawn Green15 Sep