SQL Partition Function

–DROP PARTITION FUNCTION MyDW_RangePF CREATE PARTITION FUNCTION MyDW_RangePF (datetime) AS RANGE RIGHT FOR VALUES ( ‘20130101’, ‘20140101’, ‘20150101’, ‘20160101’, ‘20170101’, ‘20180101’, ‘20190101’, ‘20200101’, ‘20210101’, ‘20220101’, ‘20230101’, ‘20240101’, ‘20250101’, ‘20260101’, ‘20270101’, ‘20280101’, ‘20290101’, ‘20300101’ )

SQL Partition Scheme

CREATE PARTITION SCHEME MyDW_PSC AS PARTITION MyDW_RangePF TO ( MyDW_2012, MyDW_2013, MyDW_2014, MyDW_2015, MyDW_2016, MyDW_2017, MyDW_2018, MyDW_2019, MyDW_2020, MyDW_2021, MyDW_2022, MyDW_2023, MyDW_2024, MyDW_2025, MyDW_2026, MyDW_2027, MyDW_2028, MyDW_2029, MyDW_2030 ) GO