MySQL Forums
Forum List  »  Partitioning

Re: How to partition by a period of time
Posted by: Jonathan Stephens
Date: December 12, 2007 02:23AM

CURDATE() isn't a supported function* and nested function calls aren't allowed in partitioning expressions.

One way you might be able to do this is to add an INT column to store the age in days, then set this column's value using a trigger. You'll also need to include this column in the table's primary key.


*It doesn't appear in the list at - I think we'll be reorganising this section of the documentation soon, as the current arrangement seems to be causing some confusion.

Jon Stephens
MySQL Documentation Team @ Oracle
Orlando, Florida, USA

MySQL Dev Zone
MySQL Server Documentation

Options: ReplyQuote

Written By
December 11, 2007 03:43AM
Re: How to partition by a period of time
December 12, 2007 02:23AM
December 13, 2007 01:27AM

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.