Personal notes-oracle, notes-oracle

Source: Internet
Author: User

Personal notes-oracle, notes-oracle


Sequence

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 jgusing t_jgxx_poly_view von (jg.id=v.id and v.geometry is not null)WHEN MATCHED THEN  update set jg.geometry = v.geometryWHEN NOT MATCHED THEN   INSERT  (id,geometry) values(v.id,v.geometry)


View

create or replace view t_jgxx_poly_view asselect xz.geometry,jg.id from t_jgxx jg, XZQH_CNTY_POLY xz where jg.xzqh=xz.cnty_code and xz.geometry is not nullunion allselect 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 nullunion allselect 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;


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.