How to list all Table Names and Count the number of Columns in HEAT Help Desk

Version 1

    Details

    Is there a SQL query that will list all the table names and the count of columns in each table?


    Resolution

    Run the following in SQl Server Management Studio:

    Select Table_Name, Count(*) As ColumnCount

    From Information_Schema.Columns

    Group By Table_Name

    Order By Table_Name