SELECT sde.st_area(zone) from sde.test1 ORDER BY name;//
SELECT shape from schools ORDER BY name;
SELECT objectid, sde.st_astext(SDE.ST_POINTfromSHAPE(shape,0)) AS points from schools;
SELECT name, sde.st_x (zone) "The X coordinate" from test ; //ÕýÈ·Ö´ÐÐ
SELECT name, sde.st_x (shape) "The X coordinate" from dijishi; //±¨´í
//¶ÔÓÚ²»ÊÇSQLÓï¾äÉú³ÉµÄ±í¸ñ£¬±ÈÈçshpÎļþimport½øÀ´µÄ£¬ÉÏÃæÓï¾ä±¨´í¡£SQLÓï¾ä½¨Á¢µÄ±í¸ñ¿Õ¼ä×Ö¶ÎΪgeometry£¬
¶øµ¼Èë½øÈ¥µÄ±í¸ñshape×Ö¶ÎÒ²ÏÔʾΪgeometry£¬µ«ÊÇͬÑùµÄÓï¾ä±¨´í¡£
ÎÊÌâÒѽâ¾ö£¬0±íʾÓõÄspatial²ÎÊý£¬spatial±íÃûΪst_spatial_references
SELECT id, st_astext (shape) AS geometry from schools;
CREATE TABLE Test(OBJECTID integer, name varchar(128), type varchar(10), zone sde.st_geometry);
CREATE TABLE Test1(OBJECTID integer, name varchar(128), type varchar(10), zone sde.st_geometry);
select * from sys.all_indexes t where t.owner='sde' AND T.INDEX_TYPE='DOMAIN';
select owner,index_name from sys.all_indexes where owner='sde';
select owner,index_name from all_indexes where domidx_status != 'VALID' or domidx_opstatus !='VALID';
drop index from sys.all_indexes where domidx_status != 'VALID' or domidx_opstatus !='VALID';
grant CREATE TYPE to SDE;
grant UNLIMITED TABLESPACE to SDE;
grant CREATE LIBRARY to SDE;
grant CREATE OPERATOR to SDE;
grant CREATE INDEXTYPE to SDE;
grant CREATE PUBLIC SYNONYM to SDE;
grant DROP PUBLIC SYNONYM to SDE;
sdelayer -o register -l Test,zone -e p -C area_id,SDE -u sde -p petrol -t ST_GEOMETRY
-u ΪÓû§ -pΪÃÜÂë
sdelayer -o register -l SIP_LAND,SHAPE -e ac+ -P BASIC -C FID,sde -u eplan -
p 123 -i esri_sde
INSERT INTO sde.Test1(name,area_id,type,zone) VALUES ('µÚ3Сѧ',3, 'school', sde.ST_PolyfromText('polygon ((76.8213 31.4152,76.8213 41.4027,126.8325 41.4017,126.8337 31.4162,76.8213 31.4152))',2));
INSERT INTO sde.Test1(OBJECTID, name,area_id,type,zone) VALUES (9, 'µÚ9ÇøÓò',9, 'school9', sde.ST_PolyfromText('polygon ((16.8213 31.4152,16.8213 4