title: PL/SQL update based on flag
body: <p>I have a table "flags" containing flags with "name" and "value" where "name" is the name of the flag and "value" is either 'T' or 'F'</p>
  
  <p>I would like to update a table based on a flag with name 'enable_feature' in the following manner:</p>
  
  <pre><code>BEGIN;
  IF ((SELECT flags.value FROM flags WHERE flags.name = 'enable_feature') = 'T')
  UPDATE... SET...;
  ELSE
  UPDATE... SET...;
  END IF;
  END;
  </code></pre>
  
  <p>My trouble seems to be in the IF statement. Specifically, i get the following error:</p>
  
  <blockquote>
    <p>PLS-00103: Encountered the symbol "SELECT" when expecting one of the
    following:</p>
    
    <p>( - + case mod new not null          continue avg count current
    exists max min prior sql stddev    sum variance execute forall merge
    time timestamp interval    date       pipe     
    
  </blockquote>
  
  <p>How do I modify this statement such that I can perform an UPDATE/SET statement based on the value of 'enable_feature' (The UPDATE/SET statement is on a different table)</p>