SQL Server sub partition

Asked by At

Same concept I want to use SQL Server.

This code is working fine in Oracle server. But I tried it in SQL Server, and I'm not able to get it.

CREATE TABLE MENT_OVD
 PARTITION BY RANGE  (OV_LENGTH) SUBPARTITION BY LIST (OV_TYPE)

  (     PARTITION OVD_P0 VALUES LESS THAN (2)
            ( SUBPARTITION OVD_S0 VALUES ('N'),
            SUBPARTITION OVD_S1 VALUES ('A'),
            SUBPARTITION OVD_S2 VALUES (DEFAULT)
            ),
        PARTITION OVD_P1 VALUES LESS THAN (3)
            ( SUBPARTITION OVD_S0 VALUES ('N'),
            SUBPARTITION OVD_S1 VALUES ('A'),
            SUBPARTITION OVD_S2 VALUES (DEFAULT)
            ),
        PARTITION OVD_P2 VALUES LESS THAN (4)
            ( SUBPARTITION OVD_S3 VALUES ('N'),
            SUBPARTITION OVD_S4 VALUES ('A'),
            SUBPARTITION OVD_S5 VALUES (DEFAULT)
            ),  
        PARTITION OVD_P3 VALUES LESS THAN (5)
            ( SUBPARTITION OVD_S6 VALUES ('N'),
            SUBPARTITION OVD_S7 VALUES ('A'),
            SUBPARTITION OVD_S8 VALUES (DEFAULT)
            ),
        PARTITION OVD_P4 VALUES LESS THAN (6)
            ( SUBPARTITION OVD_S9 VALUES ('N'),
            SUBPARTITION OVD_S10 VALUES ('A'),
            SUBPARTITION OVD_S11 VALUES (DEFAULT)
            ),
        PARTITION OVD_P5 VALUES LESS THAN (MAXVALUE)
        (SUBPARTITION OVD_S12 VALUES (DEFAULT)
        )
    )

0 Answers