How to list all tables and each table, loop through each column using SQL query
It is not uncommon to get the list of all column names from all available tables; at times some valuable information peeps out when one researches it. The following query will get you exactly that
select sys.syscolumns.name as ColumnName, sys.sysobjects.name as TableName from sys.syscolumns,sys.sysobjects where sys.sysobjects.id = sys.syscolumns.id
Subscribe to:
Post Comments (Atom)
3 comments:
it does not work in MySQL
Has to be run in db2 mainframe. Not data warehouse, works just fine for me
Only works in dp2 mainframe not in data warehouse. Works fore just fine.
Post a Comment