How to build a self-added field in Oracle

zhaozj2021-02-16  173

Implementation with sequences: create sequence seq_nameincrement by 1start with 1MaxValue 9999999999NOCYCLECHE 10

- Call: INSERT INTO TABLE (ID, NAME) VALUES (SEQ_NAME.NEXTVAL, 'Name');

How to build a field in the field in the field in the field in SQL2000, one method method 1: Trigger

Building a sequence create sequence a_seq increment by 1 start with 100; build a trigger, automatic 1create or replace trigger your_seq_tribefore insert on your_table1 for each rowdeclare next_id number; begin select your_seq.nextval into next_id from dual;: new.id: = NEXT_ID; END

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

New Post(0)