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 way to do this. Has anyone else done this before or know if it is even possible?
The following query will give the table's column names: SELECT column_name FROM INFORMATION_SCHEMA. COLUMNS. WHERE TABLE_NAME = 'News'
information_schema.columns.Table_name (at least under Sql Server 2000) includes views, so just use
SELECT * FROM information_schema.columns WHERE table_name = 'VIEW_NAME'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With