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

ST_STARTPOINT



Returns the first Point in a LineString.

Syntax

ST_STARTPOINT(<geometry_or_geography>)

Arguments

ArgumentsDescription
<geometry_or_geography>The argument must be an expression of type GEOMETRY or GEOGRAPHY that represents a LineString.

Return Type

Geometry.

Examples

GEOMETRY examples

SELECT ST_STARTPOINT( ST_GEOMETRYFROMWKT( 'LINESTRING(1 1, 2 2, 3 3, 4 4)' ) ) AS pipeline_endpoint; ┌───────────────────┐ │ pipeline_endpoint │ ├───────────────────┤ │ POINT(1 1) │ └───────────────────┘

GEOGRAPHY examples

SELECT ST_STARTPOINT( ST_GEOGFROMWKT( 'LINESTRING(1 1, 2 2, 3 3, 4 4)' ) ) AS pipeline_startpoint; ┌─────────────────────┐ │ pipeline_startpoint │ ├─────────────────────┤ │ POINT(1 1) │ └─────────────────────┘

Was this page helpful?