Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

How to extract column names from a table using Teradata SQL - response (6) by VBurmist

$
0
0

Hi,
_in a query_ you should give an alias to each table.   Then use alias to distinguish between different tables, even if two tables have the same column name, then <alias_name.column_name> will give you exactly what you want.
The use of dbc.columns refers to the table structure itself.   It does not refer to individual queries where one table can be used multiple times (with different aliases).
Regards,
Vlad.


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>