SyntaxFix
Write A Post
Hire A Developer
Questions
select * from sysobjects where xtype='pk' and parent_obj in (select id from sysobjects where name='tablename')
this will work in sql 2005