title: SQLite nested query
body: <p>I have been searching for quite some time but did not succeed to figure out how to select the id column from a table where either of the given other columns is not null.</p>
  
  <p>I tried tied a nested query like:</p>
  
  <pre><code>SELECT id, name FROM spam_table WHERE (SELECT c.name FROM pragma_table_info('spam_table') c WHERE c.name LIKE '%ham%' OR c.name LIKE '%eggs%') IS NOT NULL
  </code></pre>
  
  <p>Is there any way that the inner <code>PRAGMA</code> returns the corresponding column names to be used for the outer query. And how assure the outer query is been put together using <code>OR</code></p>
  
  <p>Cheers.</p>