• For the index query try

    INNER JOIN sys.index_columns b

    ON a.[object_id] = b.[object_id] and a.index_id = b.index_id