sql – 在Teradata中检索列和其他元数据信息

我在sql Server中有半打视图需要在teradata中复制,但我无法找到与sql元数据表相当的TD.我想复制以下功能(我认为这是相当自我解释的):
select table_name,column_id ordinal_position,column_name,data_type,char_length char_max_length,data_precision numeric_precision,data_scale numeric_scale
from user_tab_columns

select name as FUNCTION_NAME
from sys.objects
where type_desc='sql_SCALAR_FUNCTION'

select TABLE_NAME as VIEW_NAME
from informatION_SCHEMA.VIEWS

我还想知道在线是否有任何可用的teradata参考资料;我遇到的一切似乎都是广告而不是实用信息.

解决方法

所有teradata系统表都存储在DBC架构下.

对于列,它是dbc.columns

select * from dbc.columns

对于视图,dbc.tables在列上有一个名为table_type’V’的过滤器(其中V代表视图)

select * from dbc.tables

我不知道如何在teradata中获得所有功能.无论谁知道,请编辑这个答案.

teradata DBC.Tables中包含系统中存在的许多对象. (例如,存储过程,UDF,触发器,宏,视图,表,散列索引,连接索引等)列表类用于标识对象的类型.

SELECT *
FROM DBC.TABLES
WHERE TABLEKIND = '<see below>'

A = Aggregate Function
B = Combined Aggregate Function and ordered analytical function
D = JAR
E = External Stored Procedure
F = Standard Function
G = Trigger
H = Instance or Constructor Method
I = Join Index
J = Journal
M = Macro
N = Hash Index
O = No Primary Index (Table)
P = Stored Procedure
Q = Queue Table
R = Table Function
S = Ordered Analytical Function
T = Table
U = user-defined data type
V = View
X = Authorization
Y = GLOP Set

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 &#39;EastRiver&#39; 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...