【问题标题】:Redshift - extracting constraintsRedshift - 提取约束
【发布时间】:2015-01-27 10:25:26
【问题描述】:

如何获取导出的键(数据库元数据)。即使 redshift 不支持外键和主键,我也可以在系统表中看到它们。 这里的问题是在系统表中,外键的多个列作为一个列中的数组存在(尽管 redshift 不支持数组)。是否可以在一个查询中提取它们。

【问题讨论】:

标签: amazon-redshift


【解决方案1】:

使用 table_constraints 表:

SELECT * FROM information_schema.table_constraints;

【讨论】:

  • 奖金回合:SELECT * FROM information_schema.table_constraints where table_name = <tablename>
猜你喜欢
  • 2023-03-11
  • 2016-06-15
  • 2015-08-29
  • 2020-04-04
  • 2014-12-16
  • 2011-01-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多