环境:oracle 10g;条件:有A、B表;实现目标:B表复制A表记录。 ----- sql: ----- --(1) Create Table A & B CREATE TABLE A (data_orderID NUMBER(30),userID NUMBER(30)); CREATE TABLE B (orderID NUMBER(30),userID NUMBER(30)); --(2) Create Trigger CREATE OR REPLACE TRIGGER test_trg AFTER INSERT ON A REFERENCING NEW AS newRow FOR EACH ROW BEGIN INSERT INTO B VALUES(:newRow.data_orderid,:newRow.userid); END test_trg;