Reputation: 67
I am creating a report on Report Studio, using SQL queries. I add the SQL object to the queries pane and set a data source.
How can I list the datasource's tables (and the table's columns) using SQL queries?
If it helps, the underlying database is Oracle.
Upvotes: 1
Views: 2082
Reputation: 2005
List of tables:
SELECT DISTINCT table_name FROM all_tables
List of columns:
SELECT column_name FROM all_tab_columns
List of columns for a specific database:
SELECT column_name FROM all_tab_columns
WHERE table_name = UPPER('{table name}')
Upvotes: 1