问题
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_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 likeuser_tables,user_synonyms, anduser_views). It doesn't know about things like the recycle bin, though, sotabwill show you all the tables with names likeBIN$+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 liketab.
来源:https://stackoverflow.com/questions/14572361/difference-between-tab-table-and-all-tables-in-oracle