example for create sequence and trigger in oracle

create table test_b(
u_id integer not null primary key,
u_name varchar(30) not null
)

CREATE SEQUENCE test_b_seq
MINVALUE 1
MAXVALUE 9999999999
START WITH 1
INCREMENT BY 1
CACHE 100;

create or replace TRIGGER trigger_airports
BEFORE INSERT ON airports
FOR EACH ROW
BEGIN
SELECT airport_seq_id.nextval
INTO :new.u_id
FROM dual;
END;

insert into test_b(u_name)values(‘bapu2’);

create or replace TRIGGER test_after_insert AFTER INSERT ON test_b
FOR EACH ROW
BEGIN
insert into test_emp_backup values (:new.u_id, :new.u_name);
END;

select * from test_b;

select * from test_emp_backup;