Home Forums Article Discussions Article Discussions by Author Discuss content posted by Oxygen SQL Server 2005: Script all Primary Keys RE: SQL Server 2005: Script all Primary Keys
Gordo-174357
Mr or Mrs. 500
Points: 581
More actions
May 12, 2009 at 1:26 pm
#993240
Add:
where CONSTRAINT_TYPE = 'PRIMARY KEY'
to avoid scripting out the foreign keys.