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:

  1. Start SQL Server Management Studio and connect to SQL Server.
  2. Execute the following T-SQL script to create the Sample_DB ...

Get Microsoft SQL Server 2012 Performance Tuning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.