The syntax provided in this article works only for SQL Server and MySQL.
If you want to know how many tables are present in your database and the details of the table like TABLE_SCHEMA, TABLE_TYPE and all.
Syntax (When we have only single database):
Select * from schema_name.table_name
Syntax (When we have multiple databases):
Select * from database_name.schema_name.table_name
SELECT * FROM INFORMATION_SCHEMA.TABLES
1. INFORMATION_SCHEMA views allow you to retrieve metadata about the objects within a database. These views can be found in the master database under Views / System Views and be called from any database in your SQL Server instance.
2. INFORMATION_SCHEMA.TABLES The INFORMATION_SCHEMA.TABLES view allows you to get information about all tables and views within a database.
- Difference between Structured Query Language (SQL) and Transact-SQL (T-SQL)
- SQL | Create Table Extension
- SQL | Checking Existing Constraints on a Table using Data Dictionaries
- What is Temporary Table in SQL?
- SQL query to find unique column values from table
- SQL | Declare Local Temporary Table
- SQL | Query to select NAME from table using different options
- DUAL table in SQL
- Table operations in MS SQL Server
- Table Variable in SQL Server
- SQL | Procedures in PL/SQL
- SQL | Difference between functions and stored procedures in PL/SQL
- Difference between SQL and T-SQL
- How to print duplicate rows in a table?
- How to find Nth highest salary from a table
- PHP | MySQL ( Creating Table )
- Check if Table, View, Trigger, etc present in Oracle
- MySQL | Recursive CTE (Common Table Expressions)
- Query to find 2nd largest value in a column in Table
- Cloning Table in MySQL
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : khushboogoyal499