Long (geography Data Type)
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance
The longitude property of the geography instance.
Syntax
.Long
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Return Value
SQL Server type: float
CLR type: SqlDouble
Remarks
In the OpenGIS model, Long is defined only on geography instances composed of a single point. This property will return NULL if geography instances contain more than a single point. This property is precise and read-only.
Examples
This example creates a Point instance and retrieves the longitude of the point.
DECLARE @g geography;
SET @g = geography::STGeomFromText('POINT(-122.34900 47.65100)', 4326);
SELECT @g.Long;
See Also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for