title: MySQL: Define variable in WHERE clause without Selecting it
body: <p>I have table <code>journal</code> containing these columns: </p>
  
  <pre><code>| id | journalName | issn |
  </code></pre>
  
  <p>I need to: filter the table based on the concatenation result of journalName &amp; issn (using LIKE syntax) - and display <strong>only the journalName and issn</strong> (concatenation result are not selected). Concatenation result need to filtered against several LIKE criteria, so it would be reasonable to put them inside a variable.</p>
  
  <p>This is WHERE approach (concat is called repeatedly):</p>
  
  <pre><code>SELECT journalName, issn
  FROM `journal`
  WHERE 
  CONCAT_WS(' ',journalName,issn) LIKE '%375%' AND
  CONCAT_WS(' ',journalName,issn) LIKE '%res%'
  </code></pre>
  
  <p>My current approach (use variable but two SELECT statements):</p>
  
  <pre><code>SELECT journalName, issn FROM
  (
      SELECT journalName, issn, CONCAT_WS(' ',journalName,issn) AS searchable
      FROM `journal`
      HAVING 
      searchable LIKE '%375%' AND
      searchable LIKE '%res%'
      ORDER BY searchable DESC
  ) t
  </code></pre>
  
  <p>Is there any other way to do it using only one SELECT statement while having concat result stored in a variable simultaneously?</p>
  
  <p>n.b.: Adding column is not an option. I have read <a href="https://stackoverflow.com/questions/24616376/can-mysql-temporary-variables-be-used-in-where-clause">this</a> and <a href="https://stackoverflow.com/questions/3984019/mysql-user-defined-variable-in-where-clause">this</a></p>