geography.IsNull
spatial predicate IsNull
What changes
- Input
- one or two spatial instances
- Output or change
- bit
- Return type
- SQL Server type: bit CLR type: SqlBoolean
Syntax at a glance
.IsNull
Work example
Use geography.IsNull to inspect a null spatial instance in a diagnostic result.
Use SQL IS NULL for normal predicates and check empty shapes separately. Keep the geography type and SRID in the review.
Check your work The property returns NULL for a null instance; the CASE expression detects the same SQL NULL.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT n.shape.IsNull AS null_property, CASE WHEN n.shape IS NULL THEN 1 ELSE 0 END AS is_sql_null FROM (VALUES (CAST(NULL AS geography))) AS n(shape);
Open Microsoft Learn for full syntax, permissions, and details for your version.