Setting Sequence Value To A Specific Number - Oracle Database
Setting Sequence Value To A Specific Number - Oracle Database
There are times when we want to reset sequence value or set sequence value to a specific number. I have created LISTAGG DISTINCT - Remove Duplicates -
Oracle 19c
following procedure to do that for me. It will set sequence to a specific number so that nextval will be the number
Redo Files, Redo Group and Redo Thread
which you want to be. This also handles the scenarios where sequence increment by is greater then one.
Oracle Database
Oracle Database 21c is here - Innovation
Release
create or replace procedure set_sequence_nextval
Generate Nested JSON using SQL in Oracl
(
Database
p_sequence in varchar2,
p_value in number default 1 Parse JSON data in Oracle Database using
) JSON_TABLE in SQL
is Automatic Indexing in Oracle 19c
l_current_value number; Autonomous Database
l_increment_by number; SQL to calculate PI using Nilakantha Series
begin
SQL Puzzle - Calendar of Current Year
execute immediate 'select ' || p_sequence || '.nextval from dual' AVG Aggregate Function and NULL in Orac
into l_current_value; Database
Oracle Aggregate Functions - Count Sum A
select increment_by Min Max
into l_increment_by
Constraint to Validate Data and Optimize th
from user_sequences
SQL - Manual Partition
where sequence_name = upper(p_sequence);
nimishgarg.blogspot.com/2014/09/setting-sequence-value-to-specific.html 1/2
3/2/2021 Setting Sequence Value to a Specific Number - Oracle Database
- Oracle Auto Increment Column - Sequence as Default Value
- Sequence: NEXTVAL, CURRVAL and SESSION
- USER_SEQUENCES.LAST_NUMBER AND SEQUENCE CACHE
TOTAL PAGEVIEWS
Labels: Oracle PL/SQL
3 6 1 5 3 8 7
1 comment: FOLLOWERS
Seguir
►
► 2021 (2)
Publish Preview Notify me ►
► 2020 (8)
►
► 2019 (15)
Subscribe to: Post Comments (Atom) ►
► 2018 (15)
►
► 2017 (12)
►
► 2016 (17)
►
► 2015 (20)
▼
▼ 2014 (28)
►
► December (1)
►
► November (1)
►
► October (4)
▼
▼ September (2)
Difference Between Cursor And Ref Curs
Setting Sequence Value to a Specific
Number
►
► August (1)
►
► July (3)
►
► June (2)
►
► May (3)
►
► April (4)
►
► March (2)
►
► February (3)
►
► January (2)
►
► 2013 (33)
►
► 2012 (25)
►
► 2011 (23)
►
► 2010 (65)
►
► 2009 (39)
nimishgarg.blogspot.com/2014/09/setting-sequence-value-to-specific.html 2/2