Select to view content in your preferred language

What's the best way to get the objectid for a new feature created using SQL and ST_Geometry?

793
0
03-13-2017 10:04 AM
TheodoreRakel
Frequent Contributor

I'm using arc gis 10.2.1.  I create a point feature using SQL and ST_Geometry as shown below.  I need to know the objectid for this new feature.  Is it best to find the max(objectid) on the view after the row is inserted?

-- create a new point feature

insert into test_pt_evw (name,shape) values ('one', sde.ST_PointFromText('point (0.0125662 0.0046711)', 2))

--get the objectid for the new feature

select max(objectid) from test_pt_evw  

Tags (1)
0 Kudos
0 Replies