Just wondering how to list column name and table name in one query for a view.
For example:
A view named as viewC, create by tbl1 inner join tbl2, contain a,b,c,d columns (a,b from tbl1 and c,d from tbl2).
How to
Select COLUMN_NAME, DATA_TYPE, column_default, character_maximum_length, sourceTableNAME
FROM information_schema.columns
where table_name='viewC'
together?
This information is available from the
INFORMATION_SCHEMAviews:If your view includes tables from more than one database, the query will become considerably more complex