• Hi Arko Oige.

    No that is incorrect. I have no idea how that version of the code got there but it doesn't include the index count. It should look like the below.

    -- If there is more than 1 index on a column, indicate the number of indexes at start.

    case

    when ix.IndexCount > 1 then

    '(' + CAST (ix.IndexCount as varchar) + ') '

    else

    @Empty

    end

    + case

    when ix.type_desc = 'CLUSTERED' then 'c'

    when ix.type_desc = 'NONCLUSTERED' then 'nc'

    else ix.type_desc

    end

    Also note that GSquared's 2005 version has another problem with showing up indexes correctly, but I haven't taken a look at that.

    Below is reattached the SQL 2008 version including the index count.

    Note, index count will only show up if there is more than 1 index.

    Let me know if it works for you.