Oracle:
SELECT * from tables with permissions in the all_tables;--system SELECT * from dba_tables;--system table SELECT * from user_tables;--the table under the current user
SQL Server
1, using the sysobjects system table in this table, each object created in the database (for example, constraints, defaults, logs, rules, and stored procedures) has a row, and we filter out all the records in the table that are xtype equals u, which is the table in the database. The example statements are as follows:
SELECT * from sysobjects where xtype= ' U '
Note: In SQL SERVER2005, the sys.objects catalog view appears in place of the sysobjects system table, and in SQL SERVER2005 and later versions, You can query all tables using sysobjects system tables and any object in the Sys.objects catalog view.
2, use the Sys.tables catalog view sys.tables catalog view to return one row for each Table object. The example statements are as follows:
SELECT * FROM Sys.tables
Note: The Sys.tables catalog view is also available only in SQL SERVER2005 and later versions.
3, using stored procedures sp_tables sp_tables stored procedures, you can return a list of objects that can be queried in the current environment. This represents any object that can appear in the FROM clause. We can execute the following statement:
EXEC sp_tables
It is the table information that filters out all records that table_type equals table in the result set.
http://blog.csdn.net/Fuyouche/article/details/8039197
Querying all tables in a database using SQL statements