SQL Flow Field Guide

bit (data type)

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

data type bit

What changes

Input
none
Output or change
none

Syntax at a glance

bit

Work example

Store a two-state flag when null does not need to represent an unknown state.

Use NOT NULL with a default for a required flag and define the meaning of each state.

Check your work A nullable bit has three states because null is distinct from zero and one.

Practice SQL

Open in SQL Flow
SELECT CAST(1 AS bit) AS is_enabled;

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