title: MYSQL : How to see if a varchar exists in another table
body: <p>I was wondering if there was a way to check if a certain varchar from one table exists in another table without a join. I am currently updating a field in a temporary table based on if a name exists in another table. I have tried using =, like, and in but they don't seem to work. </p>
  
  <p>Here my temp table is temp_countries and I want to see if each organization_name in countries exits in my database table organization.</p>
  
  <pre><code>UPDATE temp_countries SET is_good_data = 0
  WHERE organization_name NOT IN
  (
      SELECT DISTINCT o.name   
      FROM db.country as c
      LEFT JOIN db.organization as o
      ON c.organization_fk = o.id     
      WHERE o.name IS NOT NULL
  );
  </code></pre>
  
  <p>I looked up maybe using GROUP_CONCAT but I wasn't sure it would work in this instance</p>