SQL Flow Field Guide

geography.STGeometryType

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

spatial method STGeometryType (instance.STGeometryType(...))

What changes

Input
spatial instance (and arguments)
Output or change
nvarchar(4000)
Return type
SQL Server return type: nvarchar(4000) CLR return type: SqlString

Syntax at a glance

.STGeometryType ( )

Work example

Use geography.STGeometryType to read the OGC instance type name.

Use it for diagnostics and route supported shapes explicitly. Keep the geography type and SRID in the review.

Check your work The OGC type name for the sample instance is Point.

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.STGeometryType() AS ogc_type FROM (VALUES (geography::Point(47.651, -122.349, 4326))) AS p(shape);

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