How to create a Partition Function in Sql server

A partition function in database is what that maps the rows of a table or index into partitions based on values of a specified column.

Scope of a partition function is limited to database that it was created in. Within the database, partition functions reside in separate namespace from other functions.

Any rows whose partitioning column has null values are placed in the left-most partition, unless NULL is specified as a boundary value and RIGHT is indicated.

There are two factors to consider planning for a partition function: the column whose values determine how a table is partitioned, known as partitioning column, and the range of values of the partitioning column for each partition. This range of values determines the number of partitions that make into your table. A table can have a maximum of 1,000 partitions.


create partition function pf(int)
as range left for values(10,9,8,7,6,5)

2 thoughts on “How to create a Partition Function in Sql server

Comments are closed.