sql插入查询出的数据,主键递增

 

 

 

 

INSERT INTO C_DPRECORD
    SELECT 
        (SEQ_C_DPRECORD.NEXTVAL + 1 ) AS ID,
        DEV_ID,
        DEV_CHNNUM,
        DEV_NAME,
        DEV_CHNNAME,
        CAR_NUM
    FROM C_DPRECORD
    WHERE ID = 255;
COMMIT;

UPDATE US_TASK_RECORD SET CURRENT_ID = (SEQ_C_DPRECORD.NEXTVAL - 10) WHERE ID = 1663;
COMMIT;

 

posted @ 2018-06-06 10:30  大浪不惊涛  阅读(261)  评论(0编辑  收藏  举报