SQL Flow Field Guide

geometry 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 geometry | DECLARE @g geometry

Work example

Store planar coordinates for a local map, floor plan, or other flat coordinate system.

Keep coordinate reference, units, and source axis order with each value before comparing shapes.

Check your work geometry uses a flat plane and measurements use the coordinate units of its reference system.

Practice SQL

Open in SQL Flow
SELECT geometry::Point(2, 3, 0).STAsText() AS sample_point;

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