SDE常用SQL

1.获取某个图层的srid
SELECT SRID FROM SDE.ST_GEOMETRY_COLUMNS WHERE TABLE_NAME = ? AND OWNER = ?

2.SHAPE转WKT
SELECT SDE.st_astext(SHAPE) wkt FROM table WHERE objectid = ?

4.获取下一个OBJECTID
SELECT SDE.VERSION_USER_DDL.NEXT_ROW_ID('OWNER',(SELECT REGISTRATION_ID FROM SDE.TABLE_REGISTRY WHERE TABLE_NAME = 'TABLE' AND OWNER = 'OWNER')) AS OBJECTID from dual

5.WKT转SHAPE
INSERT INTO TABLE VALUES (OBJECTID,SDE.ST_GEOMETRY('wkt', srid))

你可能感兴趣的:(sql)