I\'m attempting to select the column names of a view
in a similar way as selecting from information_schema.columns
.
I can\'t seem to find a wa
INFORMATION_SCHEMA views holds metadata about objects within database. INFORMATION_SCHEMA.COLUMNS uses underlying sys tables to retrive the metadata ( check sp_helptext 'master.Information_schema.columns' ). You can use this simpler query to select column names used in any view.
SELECT col.name
FROM .sys.columns col, .sys.views vew
WHERE col.object_id = vew.object_id
AND vew.name = ''