SQL Flow Field Guide

geometry.STArea

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

spatial method STArea (instance.STArea(...))

What changes

Input
spatial instance (and arguments)
Output or change
float
Return type
SQL Server return type: float CLR return type: SqlDouble

Syntax at a glance

.STArea ( )

Work example

Use geometry.STArea to measure enclosed area.

For geometry record coordinate units. For geography check SRID units. Keep the geometry type and SRID in the review.

Check your work Area uses coordinate units squared for geometry and typically square metres for geography. Check the returned value before using it downstream. For this geometry result, verify coordinate units in the planar reference.

Practice SQL

Open in SQL Flow
SELECT geometry::STGeomFromText('POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))', 0).STArea() AS square_units;

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