difference between “tab” table and all_tables in oracle

寵の児 提交于 2019-12-07 05:02:27

问题


what tables are returned by using (in oracle)

select * from tab

and

select * from all_tables

I would like to know the difference between two.


回答1:


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

  • all_tables gives you information about all the tables that you have access to.
  • tab gives 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 tab will show you all the tables with names like BIN$+K4PlriXSGetpagyHCvBGA==$0 that 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.


来源:https://stackoverflow.com/questions/14572361/difference-between-tab-table-and-all-tables-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!