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

ST_EQUALS



Returns TRUE if two GEOMETRY objects are spatially equal.

Syntax

ST_EQUALS(<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_EQUALS( TO_GEOMETRY('POINT(1 1)'), TO_GEOMETRY('POINT(1 1)') ) AS equals; ╭────────╮ │ equals │ ├────────┤ │ true │ ╰────────╯ SELECT ST_EQUALS( TO_GEOMETRY('POINT(1 1)'), TO_GEOMETRY('POINT(1 2)') ) AS equals; ╭────────╮ │ equals │ ├────────┤ │ false │ ╰────────╯

Was this page helpful?