  BEFORE INSERT ON %(tbl_name)s
  FOR EACH ROW
  WHEN (new.%(col_name)s IS NULL)
      BEGIN
          SELECT "%(sq_name)s".nextval
          INTO :new.%(col_name)s FROM dual;
      END;
  /""" % args
          return sequence_sql, trigger_sql
  
      def cache_key_culling_sql(self):
 
</s> remove         SELECT "%(sequence)s".nextval INTO seq_value FROM dual;
 </s> add         seq_value := "%(sequence)s".nextval; </s> remove         cursor.execute('SELECT "%s".currval FROM dual' % sq_name)
 </s> add         cursor.execute('"%s".currval' % sq_name)
        :new.%(col_name)s := "%(sq_name)s".nextval;
  BEFORE INSERT ON %(tbl_name)s
  FOR EACH ROW
  WHEN (new.%(col_name)s IS NULL)
      BEGIN
        :new.%(col_name)s := "%(sq_name)s".nextval;
        :new.%(col_name)s := "%(sq_name)s".nextval;
      END;
  /""" % args
          return sequence_sql, trigger_sql
  
      def cache_key_culling_sql(self):
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #27789 -- Simplified query for sequence value on Oracle. 
django/db/backends/oracle/operations.py