SQL Flow Field Guide

CREATE PARTITION FUNCTION

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

defines partitioning metadata

What changes

Input
catalog
Output or change
partition function (boundary values) or scheme (filegroup map)

Syntax at a glance

CREATE PARTITION FUNCTION partition_function_name ( input_parameter_type ) AS RANGE [ LEFT | RIGHT ] FOR VALUES ( [ boundary_value [ ,...n ] ] ) [ ; ]

Work example

A large table needs explicit range boundaries for data lifecycle or partition elimination.

List boundary values, direction, and future split points, then test values exactly on each boundary.

Check your work Every test value maps to the intended partition with no accidental gap or overlap.

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