当前位置:Gxlcms > 数据库问题 > oracle表分区

oracle表分区

时间:2021-07-01 10:21:17 帮助过:3人阅读

--范围分区
--建表
create table orders
(
order_id number(12),
order_date date not null,
order_total number(8,2)

partition by RANGE(order_date)
(
partition p1 VALUES less than (to_date(‘2015-01-01‘,‘yyyy-mm-dd‘)),
partition p2 VALUES less than (maxvalue)
)
INSERT INTO orders VALUES(1,SYSDATE,200)

SELECT * from orders partition(p1)

SELECT table_name,partition_name 
FROM user_tab_partitions 
WHERE table_name=UPPER(‘orders‘);

oracle表分区

标签:rac   max   ons   _id   val   use   not   nbsp   tab   

人气教程排行