Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-09-24 : 05:03:04
|
| Is there any way to drop all the primary key in the database schema? |
|
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-09-24 : 05:44:14
|
| do we need to do it one by one only |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-09-24 : 05:49:10
|
| SELECT 'ALTER TABLE '+ OBJECT_NAME(parent_object_id) +' DROP CONSTRAINT '+ NAMEFROM sys.objectsWHERE TYPE = 'PK'execute the result output |
 |
|
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-09-24 : 07:10:12
|
| Thanks bklr |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-09-24 : 08:38:40
|
| welcome |
 |
|
|
|
|
|