I'm prseenting the database schema in a BI dashboard for the people i work with so they can better understand what each field in the database does and subsequently help them understand their SQL queries better.I have done it now with the aid of this query and anything else i needed to do i handled in the BI code and a few mapping tables.SELECT c.* ,cu.CONSTRAINT_NAMEFROM INFORMATION_SCHEMA.COLUMNS AS cINNER JOIN INFORMATION_SCHEMA.TABLES AS t ON t.TABLE_CATALOG = c.TABLE_CATALOG AND t.TABLE_SCHEMA = c.TABLE_SCHEMA AND t.TABLE_NAME = c.TABLE_NAME AND t.TABLE_TYPE = 'BASE TABLE'LEFT JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE AS cu ON cu.TABLE_CATALOG = c.TABLE_CATALOG AND cu.TABLE_SCHEMA = c.TABLE_SCHEMA AND cu.TABLE_NAME = c.TABLE_NAME AND cu.COLUMN_NAME = c.COLUMN_NAMEORDER BY c.TABLE_SCHEMA, c.TABLE_NAME, c.ORDINAL_POSITION
====Paul