【发布时间】:2020-02-27 11:17:41
【问题描述】:
我在 Teradata 中创建了几个宏。但现在我不记得所有的宏名称了。谁能帮我检索 Teradata 中所有定义的宏
【问题讨论】:
标签: sql macros teradata teradata-sql-assistant
我在 Teradata 中创建了几个宏。但现在我不记得所有的宏名称了。谁能帮我检索 Teradata 中所有定义的宏
【问题讨论】:
标签: sql macros teradata teradata-sql-assistant
您可以使用dbc.tablesV 视图获取所有宏:
SELECT *
FROM dbc.tablesV
WHERE tablekind = 'M' -- table (T), view (V), macro (M), stored procedure (P)
;
根据您的TD 版本,您可能有几个不同版本的视图可用:dbc.tables、dbc.tablesV、dbc.tablesX、dbc.tablesVX:
V - supports extended object names (128 characters)
X - only shows objects the current user has permission to
VX - combination of the two
【讨论】: