ST_DIFFERENCE

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

Given two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the points in the first object that are not in the second object (i.e. the difference between the two objects).

Syntax

ST_DIFFERENCE( <geography_expression_1> , <geography_expression_2> )

Parameters

NameRequiredDescription
geography_expression_1requiredA GEOGRAPHY object.
geography_expression_2requiredA GEOGRAPHY object.

Returns

The function returns a value of type GEOGRAPHY. If all points of geography_expression_1 are in geography_expression_2 (i.e. the difference is an empty set of points), the function returns NULL.

Usage notes

See also

Referenced by