-
分区查询操作
- 查询是否分区表
PARTITIONED为YES表示是,NO表示不是分区表(不推荐):
select TABLE_NAME from user_tables where PARTITIONED = 'YES';
select TABLE_NAME from user_tables where PARTITIONED = 'NO';
或
推荐查询:
select count(*) from USER_PART_TABLES;
或
查看表的分区列是哪一列:
SQL> desc USER_PART_KEY_COLUMNS
Name Null? Type
---------------------------------------------------- -------- ------------------------------------
NAME VARCHAR2(30)
OBJECT_TYPE CHAR(5)
COLUMN_NAME VARCHAR2(4000)
COLUMN_POSITION NUMBER
SQL> select COLUMN_NAME,NAME from USER_PART_KEY_COLUMNS where NAME = '表名';
网友评论