title: Mysql query search a string in all columns of a table
body: <p>I wonder how I can mount a SQL as portable as possible to query for all columns of a table for a specific phrase, like:</p>
  
  <p><strong>Table</strong></p>
  
  <pre><code>ID | Name           | text      | Date       | Author  | Status
  1  | Augusto Weiand | Test text | 2010-01-01 | Deividi | 1
  </code></pre>
  
  <p><strong>Query</strong></p>
  
  <pre><code>SELECT * 
  FROM table 
  WHERE columns LIKE '%augusto%2010%text%"
  </code></pre>
  
  <p>I did not put enough detail, excuse me, I like to make a dynamic SQL, where I do not need to specify the columns with 'AND' or 'OR', as it is possible to do in Postgres:</p>
  
  <pre><code>Select * 
  From table 
  Where table::text ~~ '%augusto%2010%text%'
  </code></pre>