monaco-editor/website/index/samples/sample.redshift.txt
2021-11-16 22:32:27 +01:00

9 lines
313 B
Text

create view tables_vw as
select distinct(id) table_id
,trim(datname) db_name
,trim(nspname) schema_name
,trim(relname) table_name
from stv_tbl_perm
join pg_class on pg_class.oid = stv_tbl_perm.id
join pg_namespace on pg_namespace.oid = relnamespace
join pg_database on pg_database.oid = stv_tbl_perm.db_id;