From the course: Oracle Database 12c: Advanced SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using RANGE partitions

Using RANGE partitions - Oracle Database Tutorial

From the course: Oracle Database 12c: Advanced SQL

Start my 1-month free trial

Using RANGE partitions

- [Instructor] Let's see how we can create range partitioned tables. We will start by creating a table that is partitioned using the range method and we'll very creatively name this table sales_range. Going to our exercise file, you can find the create table command provided. Let's copy this command and paste it to our SQL developer window. Note that the syntax here is similar yet different from our previous examples where we created list partition table. Specifically note that we specify partition by range followed by the column on which we want to partition our table. In this case we are not partitioning via state but via the sales_date column. We explicitly create four partitions for our table. Note that when creating ranged partition tables, we need to specify a values less than clause for each one of our table partitions. This clause specify the upper bound for each partition. Any value of an inserted row partition key which is sales_date must be equal to or higher than the…

Contents