Skip to content

Instantly share code, notes, and snippets.

@liopic
Last active June 10, 2021 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liopic/c78e536822db89df58dd8689ca030ad4 to your computer and use it in GitHub Desktop.
Save liopic/c78e536822db89df58dd8689ca030ad4 to your computer and use it in GitHub Desktop.
Ways to display tables' names in diferent DB
-- redshift/postgres
select column_name,data_type
from information_schema.columns
where table_name = 'table_name';
-- databricks
describe table tablename;
-- sqlite
select
name
from sqlite_master
where type ='table'
and name not like 'sqlite_%';
-- redshift/postgres
select tablename
from pg_table_def
where schemaname = 'public';
-- Databricks
show tables;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment