oracle 如何识别所有全局临时表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40992122/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to identify all global temporary tables
提问by Michal Hru?ka
I need to identify which tables in my schema are Global Temporary Tables. Following script returns names of all my tables, but I am not able to identify which of these are GTTs and which are not.
我需要确定模式中的哪些表是 Global Temporary Tables。以下脚本返回我所有表的名称,但我无法确定哪些是 GTT,哪些不是。
SELECT OBJECT_NAME
FROM ALL_OBJECTS
WHERE OBJECT_TYPE IN ('TABLE')
AND OWNER='owner_name';
Thank you!
谢谢!
回答by Praveen
You can use ALL_TABLES
您可以使用 ALL_TABLES
select table_name
from all_tables
where TEMPORARY = 'Y'
AND OWNER='owner_name';
Temporary
column indicates whether the table is temporary (Y
) or not (N
)
Temporary
列表示该表是否是临时表 ( Y
) 或不是 ( N
)