CREATE PARTITION FUNCTION
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.