e2

滴滴侠,fai抖

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
create sequence SEQ_T_PUB_SYZ
minvalue 1
maxvalue 9999999999
start with 1
increment by 1
cache 100;

CREATE OR REPLACE TRIGGER T_PUB_SYZ_ID BEFORE INSERT ON T_PUB_SYZ FOR EACH ROW 
BEGIN
SELECT SEQ_T_PUB_SYZ.Nextval  into :NEW.ID from dual;
END;

<insert id="insert" parameterType="com.hospital.budget.domain.entity.TestEntity">
        <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="XZBH">
            SELECT SEQ_TB_XT_ZLXZ.CURRVAL from dual
        </selectKey>
        INSERT INTO VIEW1 (
        XZBH,
        XZMC,
        KSDM,
        YYBM,
        YQBH)
    VALUES (
        #{XZBH},
        #{XZMC},
        #{KSDM},
        #{YYBM},
        #{YQBH})
    </insert>

 

posted on 2022-05-03 19:49  纯黑Se丶  阅读(91)  评论(0编辑  收藏  举报