SDE for Oracle Insert 时设置 ObjectID

Summary

When data is stored in ArcSDE using the ST_Geometry type, it is possible to insert new simple features using Structured Query Language (SQL). If the layer being updated has an ArcSDE maintained row ID, use the next_row_id function from the sde.version_user_ddl package to generate a new, unique value for the row ID. The example below is from an Oracle database.


Procedure

The next_row_id function used to generate row IDs takes two parameters: owner and registration_id. Owner is the name of user who owns the table. Registration_id comes from the repository table sde.table_registry. With the table owner name and the registration ID, a SQL statement can be created that populates the row ID. The example below is from an Oracle database and uses a layer named 'parks owned' by a user named 'gisdata'.

Find the registration_id for the parks feature class owned by the gisdata user:
SQL> SELECT registration_id FROM sde.table_registry WHERE table_name = 'PARKS' and owner = 'GISDATA';



REGISTRATION_ID

---------------

             759

      SQL to be executed:
      SQL> INSERT INTO parks (OBJECTID,SHAPE) VALUES (sde.version_user_ddl.next_row_id('GISDATA', 759), ST_GEOMETRY('point (2790683.61 1130335.86)', 3));
1 row created.

http://support.esri.com/en/knowledgebase/techarticles/detail/32657

转载于:https://www.cnblogs.com/zany-hui/articles/2177034.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值