DECLARE L_X INT; BEGIN SELECT COUNT(*) INTO L_X FROM SYSTEMROLEFUNCTION WHERE ROLEID = '1'; IF L_X > 0 THEN INSERT INTO SYSTEMROLEFUNCTION (FUNCTIONID, ROLEID) VALUES ('123', '1'); END IF; COMMIT; END;
DECLARE L_X INT; BEGIN SELECT COUNT(*) INTO L_X FROM SYSTEMROLEFUNCTION WHERE ROLEID = '1'; IF L_X > 0 THEN INSERT INTO SYSTEMROLEFUNCTION (FUNCTIONID, ROLEID) VALUES ('123', '1'); END IF; COMMIT; END;