Quick ones – How to list all tables in my database?

tables
tables
Oracle
To list all tables:
sqlCopyEditSELECT tablespace_name, table_name, owner FROM dba_tables;

To list all tables of the current user:

sqlCopyEditSELECT tablespace_name, table_name, owner FROM user_tables;

To list all tables the user has access to (whether owner or not):

sqlCopyEditSELECT tablespace_name, table_name, owner FROM all_tables;
MySQL

To list all tables:

sqlCopyEditSHOW TABLES [FROM <database_name>];

or

sqlCopyEditSELECT table_schema, table_name, table_type FROM information_schema.tables [WHERE table_schema = <filter>];
DB2

To list all tables:

pgsqlCopyEditdb2 list tables for all

To list all tables for a specific schema (database):

pgsqlCopyEditdb2 list tables for schema <schema_name>
tables
SQL Server

To list all tables from all catalogs and schemas:

sqlCopyEditSELECT table_catalog, table_schema, table_name, table_type
FROM information_schema.tables
[WHERE table_catalog = <filter>];
PostgreSQL (PG)

To list all tables:

nginxCopyEditl

or

cssCopyEditdt

To list only the tables in the current database/schema:

cssCopyEditdt

Schedule a meeting here

Visit our Blog

Learn more about databases

Learn about monitoring with advanced tools

tables

Have questions about our services? Visit our FAQ

Want to see how we’ve helped other companies? Check out what our clients say in these testimonials!

Discover the History of HTI Tecnologia

Compartilhar: