做insert 操作时不要在写zseq_userinfo_userid.NEXTVAL 了 和sql2005 一样 序列会自动增长
CREATE SEQUENCE zseq_userinfo_userid;
create or replace
TRIGGER ztrg_userinfo_userid BEFORE
INSERT ON userinfo
FOR EACH ROW
WHEN (NEW.userid IS NULL) BEGIN
SELECT zseq_userinfo_userid.NEXTVAL into:new.userid FROM DUAL;
END;