title: How to select max value from oracle sql table column and make a trigger using that value
body: <p>I have a trigger as follows</p>
  <pre><code>create or replace TRIGGER MY_TRIGGER
    BEFORE INSERT ON MY_TABLE
    FOR EACH ROW
  BEGIN
    :new.ID := max(ID)+100;
  END;
  </code></pre>
  <p>Whenever I insert a new row into the table I want the new ID(a column in MY_TABLE) to be 100 more than the maximum value of ID already existing in the table. I cannot use max(ID) inside the trigger. Can someone tell what can be used instead of that to pick out the max value</p>