Answers for "sql server remove primary key without dropping table"

SQL
0

sql server remove primary key without dropping table

IF EXISTS (SELECT * FROM sys.key_constraints
           WHERE type = 'PK' AND parent_object_id = OBJECT_ID('MyTable')
           AND Name = 'PK_MyTable')
    ALTER TABLE MyTable DROP CONSTRAINT PK_MyTable
Posted by: Guest on September-15-2021

Code answers related to "sql server remove primary key without dropping table"

Code answers related to "SQL"

Browse Popular Code Answers by Language