在Postgres中,我可能使用類似于
的東西select count(p1.*) from pg_partitions p1
where p1.tablename = 'table_name'/span>;
如何在oracle中寫查詢,計算特定表的磁區數量? 什么是相當于pg_partitions的oracle?
uj5u.com熱心網友回復:
取決于你有哪些權限
表的磁區是什么?
你擁有的表的磁區
你擁有的表的磁區
select count(*) from user_tab_partitions where table_name = yourtable。
你擁有的表的磁區或你有權限看到它
select count(*) from all_tab_partitions where table_name = yourtable and table_owner = ownerofthetable 。
如果你有選擇任何字典或選擇目錄角色的特權,或對特定的dba_tab_partitions視圖的授予特權,那么
select count(*) from dba_tab_partitions where table_name = yourtable and table_owner = ownerofthetable 。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/325014.html
標籤:
上一篇:改變APEX_MAIL包
