Get the App
SLTechnology News&Howtos  ›  Database  › 

0705_oracle sequence

Shulou Source: shulou.com Published: 2022-06-01 06:32:39 10月04日 Update

-sequence sequnece

User_sequneces

Increment by 2-step size

Start with 2-starting value

Maxvalue 10-maximum 2 4 6 8 10

Nomaxvalue

Minvalue 2 minimum

Nominvalue

Cycle cycle

Nocycle

Cache 2 cach

Nocache

Order sorting

Noorder

1 3 5 7 15

Create sequnece seq1 start with 1 increment by 2 maxvalue 15 nocycle

Citation sequence

Current value sequence name. currval

The next value sequence name. Nextval

Create sequence seq3 start with 1 increment by 2 maxvalue 7 cycle

Create sequence seq3 start with 1 increment by 2 maxvalue 6 cycle nocache

Create sequence seq3 start with 3 increment by 2 maxvalue 6

Minvalue 2 cycle nocache

Cache 5

1 2 3 4 5

1 2 3 4 5 6 7 8 9 10 11

-modify sequence properties

New value of ALTER SEQUENCE xx sequence attribute

-temporary watch

Shopping cart-TABLE

(1) transaction end commit rollback

(2) end of session exit

Create global temporary table gwc (price number (4), name varchar2 (20))-transactions

Create global temporary table gwc (price number (4), name varchar2 (20)) on commit preserve rows

-

Constraint constraint

Maintain the integrity of the data

Delete constraint

SQL > ALTER TABLE nn1 DROP CONSTRAINT SYS_C0011064

Five constraints

Non-empty constraint

Unique constraint

Primary key constraint

External constraint

Check constraints-Custom constraint

Non-null constraint-do not allow null values to be inserted

1muri-keyword-NOT NULL

2Murray-Type-C

3Murray-multiple non-empty constraints are allowed in a table

4Murray-non-null constraints will inherit

5Murray-combined column constraints are not supported

Unique constraint-duplicate values are not allowed to be inserted, except for null

1Murray-keyword UNIQUE

2Murray Mutual-Type U

3Murray-multiple unique constraints are allowed in a table

4Murray-the only constraint does not inherit

5Murray-support combinational column constraints

Primary key constraint-non-null + unique

1Murray-keyword primary key

2Murray Mutual-Type P

3Mutual-one primary key constraint for lard in a table

4Murray-constraints do not inherit

5Murray-support combinational column constraints

External constraint

Tags: Sequence key keyword type support combination transaction multiple attribute fair maximum minimum integrity data maximum lard cache shopping cart step size loop Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Redmi vpn OPPO Reno Shulou Tech Info