sql 查询以在 teradata 中查找数据类型

sql query to find datatypes in teradata

我以前从未处理过 Teradata 数据库,我需要在 Teradata 中找出 table 的数据类型我尝试了以下查询,但其中 none 有效

describe table tablename; show create table tablename;help table tablename;

当我显示 table 时,我意识到这是一个视图,我尝试了 show view view name; help view view name;

none 以上查询为我提供了我要查找的视图的数据类型。我四处搜索并尝试了我的发现 none,其中的一些有效。

请帮我查询一下teradata中的数据类型。

提前致谢

HELP COLUMN mytable.*; 解析视图和 returns 实际数据类型。

两个字符ColumnType的描述可以在Data Dictionary manual

中找到

如果您需要整个 table,那么人们已经说过的东西很棒。但是,如果您只需要 1 个特定字段并希望结果可读(无需在数据字典手册中挖掘),有时我发现只需执行以下操作更简单:

Select Distinct TYPE(Fieldname)
from mytable

出于多种原因,这不是您希望每次都使用的解决方案,但我认为它值得添加到人们已经说过的内容中。