Hi, Is this what you are after: -- Lists all non-clustered primary keys in the current database select po.name, so.name, sc.name from sysobjects so join sysindexes si on si.name = so.name join sysobjects po on po.id = si.id join sysindexkeys sik on si.indid = sik.indid and si.id = sik.id join syscolumns sc on sc.id = si.id and sc.colid = sik.colid where so.xtype = 'PK' and si.indid <> 1 -- exclude those that are already clustered order by so.name, sc.colid -- Lists all clustered primary keys in the current database select po.name, so.name, sc.name from sysobjects so join sysindexes si on si.name = so.name join sysobjects po on po.id = si.id join sysindexkeys sik on si.indid = sik.indid and si.id = sik.id join syscolumns sc on sc.id = si.id and sc.colid = sik.colid where so.xtype = 'PK' and si.indid = 1 -- exclude those that are already clustered order by so.name, sc.colid Cheers, Varsha |