SQL ?????????????
?????????? Oracle ?????????????SDO?????????????
???????
SELECT t.objectid, t.comp_type, t.datatype, t.comp_name, t.health_lic, t.shape.SDO_POINT.X AS x, t.shape.SDO_POINT.Y AS y, t.reg_addr, t.bus_addr FROM t_publicplaces t WHERE 1=1 AND substr(t.comp_type,0,2)='01' AND sdo_within_distance(t.SHAPE, SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(116.4,39.9,NULL),NULL,NULL),'distance=1500.0 unit=m')='TRUE'
????????????????????????????????????????????
1. ?? t_publicplaces ??????????????ID???????????????????????????????????????
2. ??????????????? WHERE 1=1????????????????? '01' ?????????????????
3. ?? sdo_within_distance ???????????????????SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(116.4,39.9,NULL),NULL,NULL) ??????????116.4,39.9??????? 1500 ???
4. ?????????????????
???????sdo_within_distance ???????????????? 'TRUE' ? 'FALSE'????????'TRUE' ????????????????
?????????????????????????????????????????????? Oracle ???????SDO??????????????
????????????????? SQL ????????????????????????????????