際際滷

際際滷Share a Scribd company logo
1DR. GIRIJA NARASIMHAN
Part 11 - same sequence
in multi tables
2
Sequence numbers are generated independently of tables, so the
same sequence can be used for one or for multiple tables. It is
possible that individual sequence numbers will appear to be
skipped, because they were generated and used in a transaction
that ultimately rolled back. Additionally, a single user may not
realize that other users are drawing from the same sequence.
create sequence seq1
START WITH 6
INCREMENT BY 1
NOCACHE
maxvalue 9
minvalue 6
cycle;
3DR. GIRIJA NARASIMHAN
SQL> create sequence seq1
2 START WITH 6
3 INCREMENT BY 1
4 NOCACHE
5 maxvalue 9
6 minvalue 6
7 cycle;
Sequence created.
SQL> create table t1(tno number(5),tname varchar2(25));
Table created.
SQL> create table girija(gno number(5), name varchar2(25));
Table created.
4
DR. GIRIJA NARASIMHAN
SQL> insert into t1 values(seq1.nextval,'flower');
1 row created.
SQL> select * from t1;
TNO TNAME
---------- -------------------------
8 flower
SQL> insert into t1 values(seq1.nextval,'lotus');
1 row created.
SQL> select * from t1;
TNO TNAME
---------- -------------------------
8 flower
9 lotus
SQL> insert into girija values(seq1.nextval,'mango');
1 row created.
SQL> select * from girija;
GNO NAME
---------- -------------------------
6 mango
SQL> insert into girija values(seq1.nextval,'banna');
1 row created.
SQL> select * from girija;
GNO NAME
---------- -------------------------
6 mango
7 banna
SQL> insert into t1 values(seq1.nextval, 'sunflower');
1 row created.
SQL> select * from t1;
TNO TNAME
---------- -------------------------
8 flower
9 lotus
8 sunflower
Ad

Recommended

PPTX
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
AAKASH KUMAR
PPTX
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
AAKASH KUMAR
DOCX
WAP to find out whether the number is prime or not in java
One97 Communications Limited
PPTX
Part 3 drop sequence nextval,currval
Girija Muscut
PPTX
Part 33 global variable & erase global variable
Girija Muscut
PPTX
Part32 sequence using auto primary key
Girija Muscut
PPTX
Tamil Nalvar
Girija Muscut
PPTX
Visualization using Tableau
Girija Muscut
PDF
Introduction to ml
Girija Muscut
PDF
Effective Visualization with Tableau
Girija Muscut
PPTX
Guruvayoor song with audio-Udayasthamana puja
Girija Muscut
PPTX
Lakshmi lalli with audio
Girija Muscut
PPTX
Bagyada laskhmi purandara dasa
Girija Muscut
PPTX
Lakshmi lalli
Girija Muscut
PPTX
Amba nee irangaayenil - papanasam sivan song
Girija Muscut
PPTX
Mahalakshmi jagan madha - papanasm sivan tamil song
Girija Muscut
PDF
Sowbhagayaha laskhmi varuvai nee tamil song
Girija Muscut
PPTX
Bega baro Bega baro Neela Megha Varna-Vadhiraja Theertha
Girija Muscut
PPTX
Rama Nama Bhajan
Girija Muscut
PPTX
Saratha devi song 1
Girija Muscut
PPTX
Saraswathi bhajan 1 with tamil meaning
Girija Muscut
PPTX
Aneyu karadare -Purandara Dasar.
Girija Muscut
PDF
Maithriam Bhajatha with tamil meaning (lyrics)
Girija Muscut
PPTX
Unit 4 scd2-exercise 1-solution
Girija Muscut
PPTX
Unit 2 - Slowly Changing Dimension Type 1 (SCD1) (insert)
Girija Muscut
PPTX
Slowly Changing Dimension Type 1 (SCD 1) exercise 2 solution insert and update
Girija Muscut
PPTX
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
PPTX
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Celine George

More Related Content

More from Girija Muscut (20)

PPTX
Tamil Nalvar
Girija Muscut
PPTX
Visualization using Tableau
Girija Muscut
PDF
Introduction to ml
Girija Muscut
PDF
Effective Visualization with Tableau
Girija Muscut
PPTX
Guruvayoor song with audio-Udayasthamana puja
Girija Muscut
PPTX
Lakshmi lalli with audio
Girija Muscut
PPTX
Bagyada laskhmi purandara dasa
Girija Muscut
PPTX
Lakshmi lalli
Girija Muscut
PPTX
Amba nee irangaayenil - papanasam sivan song
Girija Muscut
PPTX
Mahalakshmi jagan madha - papanasm sivan tamil song
Girija Muscut
PDF
Sowbhagayaha laskhmi varuvai nee tamil song
Girija Muscut
PPTX
Bega baro Bega baro Neela Megha Varna-Vadhiraja Theertha
Girija Muscut
PPTX
Rama Nama Bhajan
Girija Muscut
PPTX
Saratha devi song 1
Girija Muscut
PPTX
Saraswathi bhajan 1 with tamil meaning
Girija Muscut
PPTX
Aneyu karadare -Purandara Dasar.
Girija Muscut
PDF
Maithriam Bhajatha with tamil meaning (lyrics)
Girija Muscut
PPTX
Unit 4 scd2-exercise 1-solution
Girija Muscut
PPTX
Unit 2 - Slowly Changing Dimension Type 1 (SCD1) (insert)
Girija Muscut
PPTX
Slowly Changing Dimension Type 1 (SCD 1) exercise 2 solution insert and update
Girija Muscut
Tamil Nalvar
Girija Muscut
Visualization using Tableau
Girija Muscut
Introduction to ml
Girija Muscut
Effective Visualization with Tableau
Girija Muscut
Guruvayoor song with audio-Udayasthamana puja
Girija Muscut
Lakshmi lalli with audio
Girija Muscut
Bagyada laskhmi purandara dasa
Girija Muscut
Lakshmi lalli
Girija Muscut
Amba nee irangaayenil - papanasam sivan song
Girija Muscut
Mahalakshmi jagan madha - papanasm sivan tamil song
Girija Muscut
Sowbhagayaha laskhmi varuvai nee tamil song
Girija Muscut
Bega baro Bega baro Neela Megha Varna-Vadhiraja Theertha
Girija Muscut
Rama Nama Bhajan
Girija Muscut
Saratha devi song 1
Girija Muscut
Saraswathi bhajan 1 with tamil meaning
Girija Muscut
Aneyu karadare -Purandara Dasar.
Girija Muscut
Maithriam Bhajatha with tamil meaning (lyrics)
Girija Muscut
Unit 4 scd2-exercise 1-solution
Girija Muscut
Unit 2 - Slowly Changing Dimension Type 1 (SCD1) (insert)
Girija Muscut
Slowly Changing Dimension Type 1 (SCD 1) exercise 2 solution insert and update
Girija Muscut

Recently uploaded (20)

PPTX
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
PPTX
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Celine George
PDF
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
PPTX
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
PPTX
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
PPTX
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
PDF
K12 Tableau User Group virtual event June 18, 2025
dogden2
PDF
VCE Literature Section A Exam Response Guide
jpinnuck
PPTX
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
PPTX
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
PPTX
2025 Completing the Pre-SET Plan Form.pptx
mansk2
PDF
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
KaryanaTantri21
PPTX
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
PPTX
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
PPTX
Peer Teaching Observations During School Internship
AjayaMohanty7
PDF
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
PPTX
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
PDF
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
PPT
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
Code Profiling in Odoo 18 - Odoo 18 際際滷s
Celine George
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
K12 Tableau User Group virtual event June 18, 2025
dogden2
VCE Literature Section A Exam Response Guide
jpinnuck
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
2025 Completing the Pre-SET Plan Form.pptx
mansk2
Romanticism in Love and Sacrifice An Analysis of Oscar Wildes The Nightingal...
KaryanaTantri21
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
Peer Teaching Observations During School Internship
AjayaMohanty7
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
Ad

Part 11 same sequence in multi tables

  • 1. 1DR. GIRIJA NARASIMHAN Part 11 - same sequence in multi tables
  • 2. 2 Sequence numbers are generated independently of tables, so the same sequence can be used for one or for multiple tables. It is possible that individual sequence numbers will appear to be skipped, because they were generated and used in a transaction that ultimately rolled back. Additionally, a single user may not realize that other users are drawing from the same sequence. create sequence seq1 START WITH 6 INCREMENT BY 1 NOCACHE maxvalue 9 minvalue 6 cycle;
  • 3. 3DR. GIRIJA NARASIMHAN SQL> create sequence seq1 2 START WITH 6 3 INCREMENT BY 1 4 NOCACHE 5 maxvalue 9 6 minvalue 6 7 cycle; Sequence created. SQL> create table t1(tno number(5),tname varchar2(25)); Table created. SQL> create table girija(gno number(5), name varchar2(25)); Table created.
  • 4. 4 DR. GIRIJA NARASIMHAN SQL> insert into t1 values(seq1.nextval,'flower'); 1 row created. SQL> select * from t1; TNO TNAME ---------- ------------------------- 8 flower SQL> insert into t1 values(seq1.nextval,'lotus'); 1 row created. SQL> select * from t1; TNO TNAME ---------- ------------------------- 8 flower 9 lotus SQL> insert into girija values(seq1.nextval,'mango'); 1 row created. SQL> select * from girija; GNO NAME ---------- ------------------------- 6 mango SQL> insert into girija values(seq1.nextval,'banna'); 1 row created. SQL> select * from girija; GNO NAME ---------- ------------------------- 6 mango 7 banna SQL> insert into t1 values(seq1.nextval, 'sunflower'); 1 row created. SQL> select * from t1; TNO TNAME ---------- ------------------------- 8 flower 9 lotus 8 sunflower