ArcGis在Oracle中常用的sql
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 select m.COLUMN_VALUE from table (select t.SHAPE.sdo_ordinates from DMGC_KFJ_CYJ t where t.OBJECTID = 300061) m
更新坐标:
update tableName set SHAPE = mdsys.sdo_geometry(2002,28420,null,mdsys.sdo_elem_info_array(1,2,1),mdsys.sdo_ordinate_array(20526892.3031,4274333.2025)) where tableName.objectid='42'
插入坐标:
insert into dmgc_gx(objectid_1, shape) values(420012, mdsys.sdo_geometry(2002,28420,null,mdsys.sdo_elem_info_array(1,2,1),mdsys.sdo_ordinate_array(123,456)))
查询坐标信息:
SELECT eventid, sde.st_astext (shape) description FROM EP_PIPELINE where eventid='491a54ab-b464-45c7-aa58-4bcca4f63b81'
更新坐标信息:
update EP_PIPELINE set SHAPE=sde.st_linefromtext('LINESTRING (X1 Y1,X2 Y2)',SRID) where eventid='491a54ab-b464-45c7-aa58-4bcca4f63b81'
删除重复数据:
delete from dmgc_kfj a where
(a.jh in
(select b.jh from dmgc_kfj b group by b.jh having count(b.jh)>1)
) and
rowid not in(select min(rowid) from dmgc_kfj c group by c.jh having count(c.jh)>1)