Redshift 入门
Jason Myers
Principal Architect



-- 查看数据库名、模式名及类型
SELECT database_name,
schema_name,
schema_type
-- 来自内部模式视图
FROM SVV_REDSHIFT_SCHEMAS;
database_name | schema_name | schema_type
=====================|=====================| ===========
datacamp_course_prod | information_schema | local
datacamp_course_prod | pg_catalog | local
datacamp_course_prod | public | local
dev | information_schema | local
dev | pg_catalog | local
dev | public | local
-- 查看表名
SELECT table_name
-- 使用包含内部与外部表的视图
FROM SVV_ALL_TABLES
-- 在 external 的 spectrumdb 模式中
WHERE schema_name = 'spectrumdb';
table_name
======================
ecommerce_sales
global_power_plant_db
coffee_county_weather
idaho_site_id
idaho_samples
Redshift 入门