Oracle solves its own growth

zhaozj2021-02-16  110

CONN Scott / Tiger @ PowerMis

Drop Table foo;

Create Table Foo (ID Number Primary Key, Data VARCHAR2 (100));

CREATE SEQUENCE FOO_SEQ;

Create or Replace Trigger Bifer_foo_id_pk Before INSERT ON FOO for Each Row Begin Select Foo_SEQ.NEXTVAL INTO: New.ID from Dual; End; /

INSERT INTO FOO (DATA) VALUES ('chirstopher');

INSERT INTO FOO (ID, DATA) VALUES (5, 'Sean');

SELECT *.

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

New Post(0)