SQL Flow Field Guide

geography.Long

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

spatial method Long (instance.Long(...))

What changes

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

Syntax at a glance

.Long

Work example

Use geography.Long to read longitude from a geography point.

Check the instance is a point and retain its SRID. Keep the geography type and SRID in the review.

Check your work The longitude is -122.349 degrees; Long is defined for a geography 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.Long AS longitude_degrees FROM (VALUES (geography::Point(47.651, -122.349, 4326))) AS p(shape);

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