首页 > 代码库 > 个人笔记-oracle
个人笔记-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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。