Partitioning a table with RANGE RIGHT
As we saw previously, there are two ways to apply partition ranges while performing table partitioning. In this recipe, we will do the same table partitioning that we did in the previous recipe, Partitioning table with RANGE LEFT. However, this time we use the RANGE RIGHT
option for our table partitioning.
Getting ready
The following are the prerequisites for this recipe:
An instance of SQL Server 2012 Developer or Enterprise Evaluation edition
Path
C:\SQLData
should be available on your machine
How to do it...
Follow the given steps to implement table partitioning with the RANGE RIGHT
option:
Start SQL Server Management Studio and connect to SQL Server.
Execute the following T-SQL script to create the
Sample_DB
database.USE master GO --Creating Sample_DB database --if it does not exist. --DROP DATABASE Sample_DB IF DB_ID('Sample_DB') IS NOT NULL DROP DATABASE [Sample_DB] CREATE DATABASE [Sample_DB] ON PRIMARY ( NAME = N'Sample_DB' ,FILENAME = N'C:\SQLData...