CREATE PARTITION FUNCTION

Create a partition function in the current database.

Syntax
      CREATE PARTITION FUNCTION pf_name (input_parameter_type)
	     AS RANGE [LEFT | RIGHT] 
		    FOR VALUES ( [ boundary_value [,...n] ] ) 
      [ ; ]

Key:
   pf_name              The partition function to create.
   input_parameter_type Data type of the column used for partitioning.
   boundary_value       The boundary values for each partition
   LEFT/RIGHT           Which side does the boundary lie

Up to 999 boundary values may be specified (1000 partitions).

By default the boundaries will be to the LEFT so FOR VALUES (5,10) would result in 3 partitions:
<= 5 Then >5 and <=10 Then >10

Example

CREATE PARTITION FUNCTION myPtnFunct (char(12))
AS RANGE FOR VALUES ('EA', 'MA', 'TZ');

"The best way to get a bad law repealed is to enforce it strictly" ~ Abraham Lincoln

Related commands:

ALTER PARTITION FUNCTION
DROP PARTITION FUNCTION
Equivalent Oracle command: CREATE TABLE Partitioning clause


© Copyright SS64.com 1999-2014
Some rights reserved