SQL Flow Field Guide

geometry::Null

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

static constructor Null (called as type::Null(...))

What changes

Input
WKT, WKB, GML or coordinates and SRID
Output or change
spatial instance
Return type
SQL Server type: geometry CLR type: SqlGeometry

Syntax at a glance

Null

Work example

Use geometry.Null to produce a typed null spatial expression for a query branch.

Handle it with SQL null tests and do not treat it as an empty shape. Keep the geometry type and SRID in the review.

Check your work IsNull is 1. Empty and valid tests return NULL because the spatial value itself is NULL.

Practice SQL

Open in SQL Flow

Open the SQL for a walkthrough. Run the example in SQL Server to check its result.

-- Planar geometry. SRID 0 coordinates here are synthetic units, not metres.
DECLARE @shape geometry;
SET @shape = geometry::[Null];
SELECT @shape.IsNull AS is_null_instance,
       @shape.STIsEmpty() AS is_empty_instance,
       @shape.STIsValid() AS is_valid;

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