SQL Flow Field Guide

geography.STSrid

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

spatial method STSrid (instance.STSrid(...))

What changes

Input
spatial instance (and arguments)
Output or change
SQL Server type: int
Return type
SQL Server type: int CLR type: SqlInt32

Syntax at a glance

.STSrid

Work example

Use geography.STSrid to read the spatial reference identifier.

Compare SRIDs before combining two spatial values. Keep the geography type and SRID in the review.

Check your work The reported SRID is 4326, the coordinate reference assigned when the point was constructed.

Practice SQL

Open in SQL Flow

Open the SQL for a walkthrough. Run the example in SQL Server to check its result.

SELECT p.shape.STSrid AS spatial_reference_id FROM (VALUES (geography::Point(47.651, -122.349, 4326))) AS p(shape);

Open Microsoft Learn for full syntax, permissions, and details for your version.