title: How to only select existing values from oracle?
body: <p>I have a table with a massive number of columns. So many, that when I do <code>SELECT *</code> I can't even see any values because all the columns fill up the screen. I'd like to do something like this:</p>
  
  <pre><code>SELECT * FROM my_table WHERE NAME LIKE '%unique name%' AND &lt;THIS COLUMN&gt; IS NOT NULL
  </code></pre>
  
  <p>Is this possible? <em>Note: VALUE is not a column.</em></p>
  
  <p>There are <a href="https://stackoverflow.com/questions/35148412/how-to-select-not-null-values-from-oracle-optimized-method">so</a> <a href="https://stackoverflow.com/questions/7780048/oracle-select-where-value-exists-or-doesnt-exist">many</a> <a href="https://stackoverflow.com/questions/22379850/oracle-select-from-table-if-values-not-exists">questions</a> <a href="https://stackoverflow.com/questions/16471928/sql-server-how-do-you-select-a-column-only-if-it-exists">on</a> SO that ask this same question, but they have some bizarre twist, and the actual question is not answered.</p>
  
  <p>I've tried:</p>
  
  <pre><code>SELECT * FROM my_table WHERE NAME LIKE '%unique name%' AND VALUE NOT NULL
                                                                       *
  Invalid relational operator
  
  SELECT * FROM my_table WHERE NAME LIKE '%unique name%' AND VALUE &lt;&gt; ''
                                                             *
  'VALUE': invalid identifier
  
  SELECT * FROM my_table WHERE NAME LIKE '%unique name%' AND COLUMN NOT NULL
                                                             *
  Missing Expression
  </code></pre>
  
  <p>Bonus Questions:</p>
  
  <ol>
  <li>Is there any way to force Oracle to only show one output screen at a time?</li>
  <li>Is there a variable to use in the WHERE clause that relates to the current column? Such as: <code>WHERE this.column = '1'</code>, where it would check each column to match that expression?</li>
  <li>Is there any way to get back your last command in Oracle? (I have to remote into a Linux box running Oracle - it's all command line - can't even copy/paste, so I have to type every command by hand, with a wonky connection, so it's taking an extremely long time to debug this stuff)</li>
  </ol>