SQL Flow Field Guide

GETANSINULL

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

system function

What changes

Input
arguments or engine/session state
Output or change
value
Return type
int

Syntax at a glance

GETANSINULL ( [ 'database' ] )

Work example

Inspect the database default nullability behavior used by column definitions.

Read state in the intended scope and immediately after the statement it describes. Treat host values as untrusted.

Check your work Check database and session context before interpreting schema-generation output.

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