All columns of the INFORMATION_SCHEMA.COLUMNS
view are listed at Learn -> SQL -> SQL Server -> COLUMNS (Transact-SQL)::
COLUMN_NAME
is of data type nvarchar(128)
:
But there is no more metadata about this column. Which collation does it have?
Where is the documentation for all of the attributes of this column:
on the Microsoft sites?
or perhaps in some SQL Server menu itself? I have Server Management Studio. With DBeaver on a MySQL database, you can check the properties of any view or table with a right click so that you can see all of the column attributes. But MS SQL Server does not have this.
Or how can I ask for the
INFORMATION_SCHEMA.COLUMNS
view of theINFORMATION_SCHEMA.COLUMNS
view? Something like:select * from INFORMATION_SCHEMA.COLUMNS where c.TABLE_SCHEMA = 'INFORMATION_SCHEMA' and c.TABLE_NAME = 'COLUMNS'
You can open a reader and then get the column schema with
GetColumnSchema()
. Here is a C# example:Prints:
You can run this C# code for example from Visual Studio with a Visual C# "ConsoleApp (.Net Framework)" project:
Which gives you a standard empty project code from where you can go on:
You can also find the INFORMATION view itself under Views > System Views in SSMS:
I think I've got what you're looking for by going to the native mssql DMVs. Note - I had to use the "all_" versions of them (which include system objects); I think this is why information_schema.columns isn't showing up in your original query: