We have moved to www.dataGenX.net, Keep Learning with us.

Monday, August 18, 2014

Oracle table is Partitioned or Not ?


For getting whether Oracle table is Partitioned or not, we can use below query on ALL_TABLES -



-- Get whether table is Partitioned or Not
SELECT
TABLE_NAME, PARTITIONED
FROM
ALL_TABLES
WHERE
Owner='PE01'
AND TABLE_NAME in ('<table1>','<table2>');
-- ALL_PART_TABLES displays the object-level partitioning information for the partitioned -
-- - tables accessible to the current user.
-- Some More information, partitioning type, partion count etc.
SELECT
OWNER, table_name, partitioning_type, subpartitioning_type, partition_count, def_subpartition_count,
partitioning_key_count, subpartitioning_key_count, status, def_tablespace_name
FROM
all_part_tables
WHERE
owner='<SCHEMA_NAME>'
AND table_name='<TABLE_NAME>';
-- Detailed info about table Partition
SELECT
*
FROM
all_tab_partitions
WHERE
table_owner='<SCHEMA_NAME>'
AND table_name = '<TABLE_NAME>';
--- http://datastage4you.blogspot.in/



Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you

https://twitter.com/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098


No comments :

Post a Comment