title: Oracle Select Statement in IF condition
body: <p>Is there a way to use the select statement in IF condition?</p>
  
  <p>For example:</p>
  
  <pre><code>IF ( SELECT TotalPrice FROM ORDER WHERE ORDERID = '123' ) &gt; 0 THEN
  
  do something
  
  ELSE 
  
  do something
  
  END IF;
  </code></pre>
  
  <p>THe one way I found is to first assign the value to some variable and use the variable in IF condition like:</p>
  
  <pre><code>SELECT TotalPrice into Variable FROM ORDER WHERE ORDERID = '123' ;
  IF variable &gt; 0 Then
  ....
  END IF
  </code></pre>
  
  <p>Is there a way to do it without using the variable?</p>