title: how to get hive output in variable?
body: <p>How to get hive query result into one variable? In SQL we use the below query.</p>
  
  <pre><code>Declare @cnt as int Select @cnt= count(*) from tabname
  </code></pre>
  
  <p>The @cnt will be used throughout the procedure.
  I don't know how to achieve the same in HIVE. Can someone tell me how to achieve this in hive prompt and Shell prompt?</p>