Last active
December 8, 2015 15:42
-
-
Save SauliusSun/b0d79fb2b607f6c31af2 to your computer and use it in GitHub Desktop.
SQL Server T-SQL drop primary key constraint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS (SELECT 1 FROM [INFORMATION_SCHEMA].[TABLE_CONSTRAINTS] WHERE [CONSTRAINT_TYPE] = 'PRIMARY KEY' AND [TABLE_NAME] = 'EshopInventoryGoalGroup') | |
BEGIN | |
ALTER TABLE [EshopInventoryGoalGroup] DROP CONSTRAINT [PK_EshopInventoryGoalGroup] | |
END | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment