Other than doing a "show view" to get the actual column, is there any other way to get that information in the dbc or system table? Note I am not asking for the alias but the actual columnn which is being referenced.
Below query will provide the actual column name
SEL TableName, ColumnName FROM DBC.COLUMNS WHERE TableName = 'T_NAME' AND DatabaseName = 'DB_NAME' ORDER BY ColumnId;
I appreciate the reply, this is ok if I am querying a table but what if I am querying a view and I need the actual view column name referenced not the alias?
SEL TableName, ColumnName FROM DBC.COLUMNS WHERE TableName = 'ViewName' AND DatabaseName = 'ViewDatabase' ORDER BY ColumnId;
You may use
Show select * from <view_name>;
this result contains complete hirerchy starting from the actual base table till the view_name that we have queried on.