Home > database >  Oracle11g, for a certain interval partition table, but the date field is the char type
Oracle11g, for a certain interval partition table, but the date field is the char type

Time:10-26

Internet, basically interval date is the date type partition, solution how to solve the char types, tables are dynamic, only keep a certain date, such as data, the six months to partition by the month, every day will be data clean up half a year ago,

CodePudding user response:

Time interval partition only on type and numeric types support, does not support the character ah, change the field type? !

1. To use the date type or TIMESTAMP type of Interval Partitioning can support according to the year, month, day, hour, minute, second partition, six types of fixed length width, respectively, by the following function transformation

Numtoyminterval (n, {' YEAR '|' MONTH '})
Numtodsinterval (n, {' DAY '|' HOUR '|' MINUTE '|' SECOND '})

2. The Interval (number), how much value a partitioning

CodePudding user response:

reference 1/f, freedom and responsibility of reply:
partition between just support for time type and digital type, does not support the character, to change the field type? !

1. To use the date type or TIMESTAMP type of Interval Partitioning can support according to the year, month, day, hour, minute, second partition, six types of fixed length width, respectively, by the following function transformation

Numtoyminterval (n, {' YEAR '|' MONTH '})
Numtodsinterval (n, {' DAY '|' HOUR '|' MINUTE '|' SECOND '})

2. The Interval (number), how much value a partitioning
thank you already confirm with the dba