title: How to detect and remove a column that contains only null values?
body: <p>In my table <strong>table1</strong> there are 6 columns Locations,a,b,c,d,e.</p>
  
  <pre><code>Locations [a]   [b]   [c]  [d]   [e]
  
  [1]       10.00 Null  Null 20.00 Null
  
  [2]       Null  30.00 Null Null  Null
  </code></pre>
  
  <p>i need the result like</p>
  
  <pre><code>Locations [a]   [b]   [d]
  
  [1]       10.00 Null  20.00
  
  [2]       Null  30.00 Null
  </code></pre>
  
  <p>My question is how to detect and delete column that contains all null values using sql query.
  Is it possible?</p>
  
  <p>If yes then please help and give sample.</p>