-- 更新订单明细商品ID
update SA_ORDER_ITEMS soi
set soi.pk_product = soi.pk_product + 18000;


-- 更新订单所属顶点（依赖于 cu_member 的 pk_vertex 字段）
merge into sa_order so
    using (select cm.PK_ID, cm.PK_VERTEX from cu_member cm) tmp
    on (tmp.PK_ID = so.pk_member)
    when matched then
        update set so.pk_vertex = tmp.pk_vertex;


-- 删除序列
drop SEQUENCE SA_ORDER_SEQ;

-- 创建序列
create sequence SA_ORDER_SEQ
    minvalue 1
    maxvalue 999999999999
    start with 1000000
    increment by 1
    cache 10;


-- 删除序列
drop SEQUENCE SA_ORDER_ITEMS_SEQ;

-- 创建序列
create sequence SA_ORDER_ITEMS_SEQ
    minvalue 1
    maxvalue 999999999999
    start with 2000000
    increment by 1
    cache 10;
