MySQL Forums
Forum List  »  Partitioning

Adding Subpartitions, help needed
Posted by: Pandit P
Date: March 19, 2019 01:21AM

Hello,

I have a tables called sales and I have created 12 (LIST) partititions for each of the business unit (id).

Now I want to add subpartitions on each of those partitions based on the year by using YEAR(report_date).

Below is the syntax I am trying

ALTER TABLE sales
MODIFY PARTITION sales_bu_p1
SUBPARTITION BY LIST (YEAR(report_date))
SUBPARTITIONS 4 (
PARTITION p2017 VALUES IN (2017),
PARTITION p2018 VALUES IN (2018),
PARTITION p2019 VALUES IN (2019),
PARTITION p2020 VALUES IN (2020)
);

But it is giving error (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use)

Please help me in correting the syntax if anything is wrong.

Thanks in advance.

Regards
Pandit.P

Options: ReplyQuote


Subject
Views
Written By
Posted
Adding Subpartitions, help needed
634
March 19, 2019 01:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.