ST_SYMDIFFERENCE
Returns the parts of two GEOMETRY objects that do not overlap.
This function only supports GEOMETRY values.
Syntax
ST_SYMDIFFERENCE(<geometry1>, <geometry2>)
Arguments
Return Type
GEOMETRY.
Examples
SELECT ST_ASWKT(ST_SYMDIFFERENCE(TO_GEOMETRY('POINT(0 0)'), TO_GEOMETRY('POINT(1 1)')));
╭──────────────────────────────────────────────────────────────────────────────────╮
│ st_aswkt(st_symdifference(to_geometry('POINT(0 0)'), to_geometry('POINT(1 1)'))) │
├──────────────────────────────────────────────────────────────────────────────────┤
│ MULTIPOINT(0 0,1 1) │
╰──────────────────────────────────────────────────────────────────────────────────╯