程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> 個人筆記-oracle

個人筆記-oracle

編輯: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;


  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved