geography data type
spatial CLR data type
What changes
- Input
- none
- Output or change
- none
Syntax at a glance
column_name geography | DECLARE @g geography
Work example
Store latitude and longitude shapes when earth curvature matters to distance or area.
Set the intended SRID, confirm latitude and longitude order, and compare only values in the same reference system.
Check your work geography models round-earth coordinates and measurements depend on its SRID.
Practice SQL
Open in SQL FlowSELECT geography::Point(0.01, 0.02, 4326).STAsText() AS sample_point;
Open Microsoft Learn for full syntax, permissions, and details for your version.