Forums - C# Corner

Forum guidelines
Parminder  Pal Singh

Parminder Pal Singh

  • 1.2k
  • 255
  • 152.3k

How to list all the System Views?

Aug 2 2017 4:00 AM

I hope you all are doing well. Today i came with new challenge. The matter included in this form is just for the knowledge purpose, so following is the thing what i am looking for.
As We have metadata of all objects inside the System Views of Views like sys.tables, sys.all_objects, sys.columns etc. I don't want to go with any user interface, just want to list all the things with a query. How can i list all the System Views?
I need a query that can list all the System Views, e.g output should be like that:

query: SELECT * FROM [dbo].[abc]

-- Name --
1) sys.tables
2) sys.columns
3) sys.views
4) information_schema.schemata
N) upto so on....

Answers (7)