How to get columns from system tables or views like sys.database_files (SQL Server 2012)
-
02-11-2019 - |
Question
How can I write a query to return all columns of, for example, the sys.database_files
table? I see many suggestions for using information_schema.columns for getting table names for user databases/tables, but i can't figure out how to do this for system tables.
I see that the sys.database_files is a view under the master table. I'm using SQL Server 2012.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange