如何查看表上有哪些表分区?

解决方案 »

  1.   

    select subobject_name
      from user_objects
     where object_name = 'XXXX'
       and object_type = 'TABLE PARTITION';
      

  2.   

    SELECT * FROM user_tab_partitions
    WHERE table_name=;
      

  3.   


    select * from user_part_tables;
    select * from user_tab_partitions;
    select * from user_tab_subpartitions;select * from user_part_indexes;
    select * from user_ind_partitions;
    select * from user_ind_subpartitions;
    select table_name,
           partitioning_type type,
           p.subpartitioning_type,
           p.partition_count
      from user_part_tables p;
    select index_name,
           partitioning_type type,
           p.subpartitioning_type,
           p.partition_count
      from user_part_indexes p;
    select tp.table_name, tp.high_value, tp.subpartition_count, tp.tablespace_name
      from user_tab_partitions tp;
      
      
    select ts.partition_name, ts.subpartition_name, ts.tablespace_name
      from user_tab_subpartitions ts;
      
    select tp.index_name, tp.high_value, tp.tablespace_name
      from user_ind_partitions tp;
      

  4.   

    两位的方法我都试过来,出不来啊,我用的ORACLE9I
      

  5.   

    什么提示信息?你有写全WHERE table_name='大写的你的表名'吗?
      

  6.   

    select * from user_tab_partitions where table_name = 's_send_sms_integrate_history';
    查询结果把我的列名都显示出来了
      

  7.   

    SELECT table_name,partition_name FROM user_tab_partitions
    WHERE table_name='大写表名';
      

  8.   

    OK,谢谢suiziguo,我一直认为ORACLE是不区分大小写的,能解释下这里为什么要区分大小写吗?
      

  9.   

    ''里是具体数据。
    ORACLE的关键字是不区分大小写的。select sysdate from dual

    SELECT SYSDATE FROM DUAL完全等同。
    但是具体数据是区分大小写的,ORACLE的内部数据字典数据,就是为了避免不必要的麻烦,对象名全部为大写。除非你使用了双引号,ORACLE会存小写,但是你会发现,这样做后患无穷!!!
      

  10.   

    个人拙见....
    我可不认同,你的完全等同的说法...
    当你向ORACLE 提交一个SQL语句,ORACLE会首先在共享内存中查找是否有相同的语句。这里需要注明的是,ORACLE对两者采取的是一种严格匹配,要达成共享,SQL语句必须完全相同(包括空格,换行等)