标签:oracle
序列
select * from user_sequences select last_number from user_sequences where sequence_name='T_JGXX_POLY_SEQ'; alter sequence T_JGXX_POLY_SEQ increment by 1; SELECT T_JGXX_POLY_SEQ.NEXTVAL FROM DUAL;
Meger
merge into t_jgxx_poly jg using t_jgxx_poly_view v on (jg.id=v.id and v.geometry is not null) WHEN MATCHED THEN update set jg.geometry = v.geometry WHEN NOT MATCHED THEN INSERT (id,geometry) values(v.id,v.geometry)
view
create or replace view t_jgxx_poly_view as select xz.geometry,jg.id from t_jgxx jg, XZQH_CNTY_POLY xz where jg.xzqh=xz.cnty_code and xz.geometry is not null union all select xz.geometry,jg.id from t_jgxx jg, XZQH_PREF_POLY xz where jg.xzqh=TO_CHAR(xz.PREF_CODE) and xz.geometry is not null union all select xz.geometry,jg.id from t_jgxx jg, XZQH_PROVINCE_POLY xz where jg.xzqh=TO_CHAR(xz.PROV_CODE) and xz.geometry is not null;
标签:oracle
原文地址:http://blog.csdn.net/ztt_1119/article/details/43197615