📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ST_DISJOINT



Returns TRUE if two GEOMETRY objects do not intersect.

Syntax

ST_DISJOINT(<geometry1>, <geometry2>)

Arguments

ArgumentsDescription
<geometry1>The argument must be an expression of type GEOMETRY.
<geometry2>The argument must be an expression of type GEOMETRY.

Return Type

Boolean.

Examples

SELECT ST_DISJOINT( TO_GEOMETRY('POINT(3 3)'), TO_GEOMETRY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))') ) AS disjoint; ╭──────────╮ │ disjoint │ ├──────────┤ │ true │ ╰──────────╯ SELECT ST_DISJOINT( TO_GEOMETRY('LINESTRING(0 0, 2 2)'), TO_GEOMETRY('LINESTRING(0 2, 2 0)') ) AS disjoint; ╭──────────╮ │ disjoint │ ├──────────┤ │ false │ ╰──────────╯

Was this page helpful?