Recently I was asked to find all the Primary keys that are not clustered Indexes in the database. I constructed the below script which will help us to locate the primary keys in the database which are not clustered index.
2013-09-18 (first published: 2013-09-04)
This code helps in finding Primary Keys for all tables in a database.
2012-10-02 (first published: 2012-09-04)
Output table of gaps in a primary key across multiple databases on same, remote and/or linked servers.
2011-08-29 (first published: 2011-08-12)
Following script will list out all the columns which have unique/primary key constraints for a given table.
2009-01-02 (first published: 2008-12-10)