title: declare and call variable in trigger in oracle
body: <p>I am trying to declare a variable and accessing it again to update same table for a particular id.(Updating <code>STATUS</code> from <code>'E'</code> to <code>'R'</code>)</p>
  
  <pre><code>create or replace trigger resume_trgr
  before update on temp_jobs
  
  DECLARE
  job_status varchar(2);
  
  begin
    select STATUS into :job_status from temp_jobs where id=6120;
    if :job_status='E'
    then
      update temp_jobs set STATUS='R' where id=6120;
    end if;
  end;
  /
  </code></pre>
  
  <p>But it returning error while executing above code. Error code is below:</p>
  
  <p>Trigger resume_trgr compiled</p>
  
  <pre><code> Errors: check compiler log
  
   Error(5,27): PLS-00049: bad bind variable 'STATUS'
  </code></pre>