create or replace trigger randToNotice
after insert on rand_result
for each row
declare
userId varchar(36);
BEGIN
select id INTO userId from front_user_info where
regno=(select regno from rand_result where regno=:NEW.REGNO) or
uniscid=(select uniscid from rand_result where uniscid=:NEW.UNISCID);
INSERT INTO NOTICE(ISLOOK,USER_ID,CONTENT,TYPE,MSG_TIME) VALUES('0',userId,:NEW.HANDLE_RESULT,'01',sysdate);
END;
RAND_RESULT ID VARCHAR2(36) NOT NULL, CODE VARCHAR2(20) NULL, UNISCID VARCHAR2(50) NULL, REGNO VARCHAR2(50) NULL, HANDLE_ORGAN VARCHAR2(50) NULL, HANDLE_PERSON VARCHAR2(50) NULL, HANDLE_DATE TIMESTAMP(9) NULL, HANDLE_RESULT VARCHAR2(200) NULL, HANDLE_OPINION VARCHAR2(200) NULL, ISLOOK CHAR(1) NULL NOTICE ID VARCHAR2(36) NOT NULL, ISLOOK CHAR(1) NULL, USER_ID VARCHAR2(36) NULL, CONTENT VARCHAR2(1000) NULL, TYPE VARCHAR2(2) NULL, MSG_TIME TIMESTAMP(9) NULL
在plsql执行入下图
select语句有问题。