ITPub博客

首页 > 数据库 > Oracle > Oracle OCP 1Z0 053 Q224(Interval Partition)

Oracle OCP 1Z0 053 Q224(Interval Partition)

原创 Oracle 作者:abstractcyj 时间:2016-04-01 16:32:22 0 删除 编辑
224.You need to create a partitioned table to store historical data and you issued the following command:
CREATE TABLE purchase_interval PARTITION BY RANGE (time_id) INTERVAL
(NUMTOYMINTERVAL(1,'month')) STORE IN (tbs1,tbs2,tbs3) ( PARTITION p1 VALUES LESS
THAN(TO_DATE('1-1-2005', 'dd-mm-yyyy')), PARTITION p2 VALUES LESS THAN(TO_DATE('1-1- 2007',
'dd-mm-yyyy'))) AS SELECT * FROM purchases WHERE time_id < TO_DATE('1-1-2007','dd-mm-yyyy');
What is the outcome of the above command?
A. It returns an error because the range partitions P1 and P2 should be of the same range.
B. It creates two range partitions (P1, P2). Within each range partition, it creates monthwise subpartitions.
C. It creates two range partitions of varying range. For data beyond '1-1-2007,' it creates partitions with a
width of one month each.
D. It returns an error because the number of tablespaces (TBS1,TBS2,TBS3)specified does not match
the number of range partitions (P1,P2) specified.
Answer: C

INTERVAL 是11G新增的自动分区特性
该语句建立p1、p2两个分区,其后的数据按月自动进行分

参考:http://blog.csdn.net/jgmydsai/article/details/38231135

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8520577/viewspace-2073806/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业

注册时间:2010-01-26

  • 博文量
    565
  • 访问量
    867335