How to find name of all tables in MySQL database
SELECT table_name FROM information_schema.tables WHERE table_type = 'base table' AND table_schema='test';
SHOW tables;
How to find name of all tables in SQL Server database
USE test; //SELECT DATABASE
SELECT table_name FROM information_schema.tables WHERE table_type = 'base table'
or you can use sys.tables to get all table names from selected database as shown in following SQL query
USE test; //SELECT DATABASE
SELECT * FROM sys.tables
Read full article from SQL Query to find all table names on database in MySQL and SQL Server Examples
SELECT table_name FROM information_schema.tables WHERE table_type = 'base table' AND table_schema='test';
SHOW tables;
How to find name of all tables in SQL Server database
USE test; //SELECT DATABASE
SELECT table_name FROM information_schema.tables WHERE table_type = 'base table'
or you can use sys.tables to get all table names from selected database as shown in following SQL query
USE test; //SELECT DATABASE
SELECT * FROM sys.tables
Read full article from SQL Query to find all table names on database in MySQL and SQL Server Examples
No comments:
Post a Comment