BEGIN
DELETE FROM SYSROLEOPENR WHERE ROLEID = 2;
INSERT INTO SYSROLEOPENR
(PKID, ROLEID, OPERID)
SELECT SYSROLEOPENR_PKID_SEQ.NEXTVAL, '2' ROLEID, OPERID
FROM SYSMODULEOPER
WHERE OPERCODE = '300090010';
INSERT INTO SYSROLEOPENR
(PKID, ROLEID, OPERID)
SELECT SYSROLEOPENR_PKID_SEQ.NEXTVAL, '2' ROLEID, OPERID
FROM SYSMODULEOPER
WHERE OPERCODE = '300090020';
INSERT INTO SYSROLEOPENR
(PKID, ROLEID, OPERID)
SELECT SYSROLEOPENR_PKID_SEQ.NEXTVAL, '2' ROLEID, OPERID
FROM SYSMODULEOPER
WHERE OPERCODE = '300090050';
END;