      SELECT NVL(MAX(%(column)s), 0) INTO table_value FROM %(table)s;
      SELECT NVL(last_number - cache_size, 0) INTO seq_value FROM user_sequences
             WHERE sequence_name = '%(sequence)s';
      WHILE table_value > seq_value LOOP
          SELECT "%(sequence)s".nextval INTO seq_value FROM dual;
      END LOOP;
  END;
  /"""
  
      def __init__(self, *args, **kwargs):
 
</s> remove         SELECT "%(sq_name)s".nextval
        INTO :new.%(col_name)s FROM dual;
 </s> add         :new.%(col_name)s := "%(sq_name)s".nextval; </s> remove         cursor.execute('SELECT "%s".currval FROM dual' % sq_name)
 </s> add         cursor.execute('"%s".currval' % sq_name)
        seq_value := "%(sequence)s".nextval;
      SELECT NVL(MAX(%(column)s), 0) INTO table_value FROM %(table)s;
      SELECT NVL(last_number - cache_size, 0) INTO seq_value FROM user_sequences
             WHERE sequence_name = '%(sequence)s';
      WHILE table_value > seq_value LOOP
        seq_value := "%(sequence)s".nextval;
      END LOOP;
  END;
  /"""
  
      def __init__(self, *args, **kwargs):
keep keep keep keep replace keep keep keep keep keep
 Fixed #27789 -- Simplified query for sequence value on Oracle. 
django/db/backends/oracle/operations.py