SQL Flow Field Guide

geography data type

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

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 Flow
SELECT geography::Point(0.01, 0.02, 4326).STAsText() AS sample_point;

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