title: how sequence maintain concurrency in oracle
body: <p>what happened, if sequence has been access at the same time (<strong>even in milliseconds</strong>) by multiple users. Whether it will be dead lock or Oracle have some mechanism ?</p>
  
  <p>I mean, If A and B users has requested for <code>nextval</code> from <code>squence1</code> at same time, then they will get same value or they will hanged.</p>
  
  <p>According to <a href="http://blog.aggregatedintelligence.com/2008/12/oracle-sequences-and-concurrency.html" rel="noreferrer">this blog</a>, it says</p>
  
  <blockquote>
    <p>Concurrent access of NextVal on a sequence will always return separate
    values to each caller. (Unless the sequence has been setup to cycle
    values - in which case duplicate values are possible).</p>
  </blockquote>