Question
· Apr 3, 2023

How to list all the tables available in a current database?

Hi developers!

What is the way using SQL to list all the tables available in the current database/namespace?

Product version: IRIS 2022.3
Discussion (4)1
Log in or sign up to continue

Hi @Evgeny Shvarov,

List of Tables can be listed by using the below query against all or specific schema:

SELECT TOP 5 * FROM INFORMATION_SCHEMA.TABLES
--WHERE TABLE_NAME LIKE '%CSP%'


While Columns details can be listed by using the below query:

SELECT TOP 5 * FROM INFORMATION_SCHEMA.COLUMNS
--WHERE TABLE_NAME LIKE '%CSP%'
--AND TABLE_SCHEMA LIKE '%CSP%'

Thanks