How to get columns from system tables or views like sys.database_files (SQL Server 2012)

dba.stackexchange https://dba.stackexchange.com/questions/53500

  •  02-11-2019
  •  | 
  •  

문제

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.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top