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

ST_SRID



Returns the SRID (spatial reference system identifier) of a GEOMETRY or GEOGRAPHY object.

Syntax

ST_SRID(<geometry_or_geography>)

Arguments

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

Return Type

INT32.

Examples

GEOMETRY examples

SELECT ST_SRID( TO_GEOMETRY( 'POINT(-122.306100 37.554162)', 1234 ) ) AS pipeline_srid; ┌───────────────┐ │ pipeline_srid │ ├───────────────┤ │ 1234 │ └───────────────┘ SELECT ST_SRID( ST_MAKEGEOMPOINT( 37.5, 45.5 ) ) AS pipeline_srid; ┌───────────────┐ │ pipeline_srid │ ├───────────────┤ │ 0 │ └───────────────┘

GEOGRAPHY examples

SELECT ST_SRID( ST_GEOGFROMWKT( 'POINT(1 2)' ) ) AS pipeline_srid; ┌───────────────┐ │ pipeline_srid │ ├───────────────┤ │ 4326 │ └───────────────┘

Was this page helpful?