Home > database >  Essentially a table partition, how to add the number of types of partition condition
Essentially a table partition, how to add the number of types of partition condition

Time:09-23

CREATE PARTITION FUNCTION funcName (varchar)
AS the RANGE LEFT
FOR VALUES (' abc01 ', 'sbd02')

CodePudding user response:

E.g. : If it ensures primary file group contains all records of the table. Now you are going to split the table into 2 partitions. You can use the following syntax:

CREATE PARTITION FUNCTION PF_Tbl_3rdParatition (NUMERIC (18, 0)) AS the RANGE LEFT
FOR VALUES (500);

CREATE PARTITION SCHEME PS_Tbl_3rdParatition AS PARTITION PF_Tbl_3rdParatition TO ([PRIMARY], [SWPPartitionFG1])

CREATE UNIQUE CLUSTERED INDEX CidxTbl_3rdParatition ON dbo. Tbl_3rdParatition (PK) WITH (DROP_EXISTING=ON) ON PS_Tbl_3rdParatition (PK);
Partition1 stored in SWPPartitionFG1

CodePudding user response:

Partition function of the value, generally with a DATETIME, int type should can also,
There's no way to sprawling value as a partition function of the value, because it is essentially unable to define the boundary of the partition,
  • Related