Sql show tables

This article is tagged with: Sql show tables and mysql

sql show tables

Showing all table:
show tables;
Showing table data:
SELECT
* or column_names
FROM
table_name;

sql all tables

-- Oracle
SELECT *
FROM ALL_TABLES;
-- MySQL
SELECT *
FROM INFORMATION_SCHEMA.TABLES;

get the list of all tables in sql server

SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='YOUR_Database_name'

mariadb show tables

SHOW TABLES FROM database

how to check table name in current database sql

SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG=db_name()
and TABLE_NAME like'%table_name%'--to check particular table

how to get all table names in sql query

BY LOVE SINGH
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='YOUR_Database_name'

This article is tagged with: Sql show tables and mysql