oracle oracle中“tab”表和all_tables的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14572361/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:24:45  来源:igfitidea点击:

difference between "tab" table and all_tables in oracle

sqloracleoracle10goracle11g

提问by big

what tables are returned by using (in oracle)

使用(在oracle中)返回哪些表

select * from tab

and

select * from all_tables

I would like to know the difference between two.

我想知道两者的区别。

回答by Justin Cave

tabis an ancientdata dictionary table that should never be used. It exists solely to provide backwards compatibility for scripts that were written potentially decades ago. tabdoes not get updated as new object types and new features get added.

tab是一个永远不应该使用的古老数据字典表。它的存在仅仅是为了为可能在几十年前编写的脚本提供向后兼容性。 tab不会随着新对象类型和新功能的添加而更新。

  • all_tablesgives you information about all the tables that you have access to.
  • tabgives you information about tables, views, and synonyms that you own (making it more similar to views like user_tables, user_synonyms, and user_views). It doesn't know about things like the recycle bin, though, so tabwill show you all the tables with names like BIN$+K4PlriXSGetpagyHCvBGA==$0that are in the recycle bin. Realistically, any object types that have been added at least since the Oracle 7 days are likely to create problems for legacy data dictionary tables like tab.
  • all_tables为您提供有关您有权访问的所有表的信息。
  • tab为您提供有关表,视图和同义词,你自己(使它更类似于观点类似的信息user_tablesuser_synonymsuser_views)。但是,它不知道诸如回收站之类的事情,因此tab将向您显示BIN$+K4PlriXSGetpagyHCvBGA==$0回收站中具有类似名称的所有表。实际上,至少自 Oracle 7 天以来添加的任何对象类型都可能为遗留数据字典表(如tab.