• This will list all tables and columns for a database. You can add a filter to return columns for a specified table.

    SELECT st.name AS TableName

    , sc.name AS ColumnName

    FROM sys.tables AS st

    INNER JOIN sys.columns sc ON st.OBJECT_ID = sc.OBJECT_ID

    ORDER BY st.name

    , sc.name