Math, asked by umarfarukpakali1234, 6 months ago

Write nul as an interval.​

Answers

Answered by singhamanpratap0249
17

We use partitioning to be able to delete old data (Oracle calls this ILM). There is a column with the "best before date", after which the partition will be dropped.

To avoid having to add partitions manually (or per script), we use interval partitioning:

CREATE TABLE my_table (

id NUMBER NOT NULL PRIMARY KEY,

--... other columns ...

t DATE

) PARTITION BY RANGE (t) INTERVAL(NUMTODSINTERVAL(7, 'DAY')) (

PARTITION PRE2018 VALUES LESS THAN (DATE '2018-01-01')

);

INSERT INTO my_table(id, t) VALUES (1, SYSDATE);

-- 1 row inserted.

Answered by mahek77777
13

We use partitioning to be able to delete old data (Oracle calls this ILM). There is a column with the "best before date", after which the partition will be dropped.

To avoid having to add partitions manually (or per script), we use interval partitioning:

Similar questions