Write SQL query to retrieve all tables of the database.
- There are many ways to retrieve all the tables from any database like MySQL and SQL server.
- In simple term you can get table names either from INFORMATION_SCHEMA or sys.tables.
- It is based upon whether you are using MySQL or SQL Server database.
Following query is the easiest way to retrieve all the tables of the database:SELECT name FROM sysObjects WHERE xtype='u';