postgresql 中 all_tables 和 all_tab_columns 的等价物是什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9291218/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
what is the equivalent of all_tables and all_tab_columns in postgresql
提问by Amrin
I am trying to run oracle query
我正在尝试运行 oracle 查询
SELECT OWNER,
TABLE_NAME
FROM ALL_TABLES;
SELECT COLUMN_NAME,
DATA_TYPE,
DATA_LENGTH,
NULLABLE,
COLUMN_ID,
DATA_PRECISION,
DATA_SCALE
FROM ALL_TAB_COLUMNS
in postgresql but it is not able to excute that because PostgreSQL doesn't have ALL_TAB_COLUMNS and ALL_TABLES
在 postgresql 中,但它无法执行,因为 PostgreSQL 没有 ALL_TAB_COLUMNS 和 ALL_TABLES
Can any body suggest what is the equivalent query of that
任何机构都可以建议什么是等效的查询
回答by a_horse_with_no_name
ALL_TABLES is equivalent to the (ANSI standard) view information_schema.tables
: http://www.postgresql.org/docs/current/static/infoschema-tables.html
ALL_TABLES 相当于(ANSI 标准)视图information_schema.tables
:http: //www.postgresql.org/docs/current/static/infoschema-tables.html
ALL_TAB_COLUMNS is equivalent to the (ANSI standard) view information_schema.columns
: http://www.postgresql.org/docs/current/static/infoschema-columns.html
ALL_TAB_COLUMNS 相当于(ANSI 标准)视图information_schema.columns
:http: //www.postgresql.org/docs/current/static/infoschema-columns.html
回答by Michael
information_schema.columns lacks the Num_Distinct and Num_Nulls information columns.
information_schema.columns 缺少 Num_Distinct 和 Num_Nulls 信息列。