title: SQL return rows if matches keywords
body: <p>I have a large list of strings (outside of a PostgreSQL database), and I want to go through that list of strings (in a loop) and want to check to see if any part of the string belongs in a table.</p>
  
  <p>For example, I have the two following tables:</p>
  
  <pre><code>table name: trigger_keyword
  id (int)
  keyword (text)
  </code></pre>
  
  <p>and table 2:</p>
  
  <pre><code>table name: trigger_message
  id  int
  message text    
  trigger_keyword_id int /*this is a fk to id on trigger_keyword */
  </code></pre>
  
  <p>Let's assume we have key word "weather good" in the <code>trigger_keyword</code> table, and we have a message in <code>trigger_message</code> linked to the id of that keyword.</p>
  
  <p>so below is an example of how things look in our tables</p>
  
  <p>trigger_keyword table</p>
  
  <pre><code>id                             keyword
  -----------------------------------------------------
  1    weather good
  </code></pre>
  
  <p>trigger_message table</p>
  
  <pre><code>id   message                   trigger_keyword_id
  -----------------------------------------------------
  1    yes, the weather is good  1
  </code></pre>
  
  <p>in one of our strings outside of the SQL database we have the following sentence</p>
  
  <p>"is the weather good in Alaska?"</p>
  
  <p>What SQL can I write to return "yes, the weather is good" because "weather good" is in our <code>trigger_keyword</code> table? do I need to use <code>LIKE</code> for this? I only need help with the SQL portion.</p>