How to implement a field automatically increase in Oracle 1

xiaoxiao2021-03-05  27

Create a sequence of a minimum of 1, a serial number of 999999999, will automatically loop

Create sequence sequence name

INCREMENT BY 1

START WITH 1

MaxValue 999999999

Cycle;

When inserting data into the table, the SQL statement is written as follows:

SQL> INSERT INTO Name VALUES (sequence name .NextVal, column 1 value, column 2 value);

转载请注明原文地址:https://www.9cbs.com/read-33728.html

New Post(0)