Single-Table Predicate
For single-table predicates except distance methods ST_Distance and ST_3DDistance:
SELECT a, b FROM TableName WHERE { TableName.GeoCol.SupportedGeoMethod (GeospatialLiteralExpression) = 1 | GeospatialLiteralExpression.SupportedGeoMethod (TableName.GeoCol) = 1 | TableName.GeoCol IS NULL }
The expression must be set to evaluate to 1 (true) for the first two forms to qualify as single-table predicates.
Single-Table Distance Predicate
For distance methods ST_Distance and ST_3DDistance:
SELECT a, b FROM TableName WHERE { TableName.GeoCol.SupportedGeoDistanceMethod (GeospatialLiteralExpression) { < | <= } DistanceLiteral | GeospatialLiteralExpression.SupportedGeoDistanceMethod(TableName.GeoCol) { < | <= } DistanceLiteral }
Syntax Elements
- TableName
- Table containing a geospatial data column.
- GeoCol
- Geospatial data column defined as one of the ST_GEOMETRY types.
- SupportedGeoMethod
- One of the specified geospatial methods, excluding ST_Distance and ST_3DDistance.
- SupportedGeoDistanceMethod
- Either ST_Distance or ST_3DDistance.
- GeospatialLiteralExpression
- An arbitrary geospatial literal expression that can be folded (simplified) in to a geospatial literal value.
- DistanceLiteral
- A floating point value representing a distance.