显示表,描述与redshift等价的表 [英] Show tables, describe tables equivalent in redshift

查看:68
本文介绍了显示表,描述与redshift等价的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是AWS的新手,有人可以告诉我redshifts与mysql命令等效吗?

I'm new to aws, can anyone tell me what are redshifts' equivalents to mysql commands?

show tables -- redshift command
describe table_name -- redshift command

推荐答案

所有信息都可以在PG_TABLE_DEF表中找到,该表

All the information can be found in a PG_TABLE_DEF table, documentation.

列出public模式中的所有表(默认)-等价于show tables:

Listing all tables in a public schema (default) - show tables equivalent:

SELECT DISTINCT tablename
FROM pg_table_def
WHERE schemaname = 'public'
ORDER BY tablename;

描述名为 table_name -describe table的表中的所有列:

Description of all the columns from a table called table_name - describe table equivalent:

SELECT *
FROM pg_table_def
WHERE tablename = 'table_name'
AND schemaname = 'public';

这篇关于显示表,描述与redshift等价的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆