Monday , December 10 2018
Home / DataBase / SQL SERVER / How to Drop a Primary Key Constraints in Sql Server

How to Drop a Primary Key Constraints in Sql Server

 In Sql Server, primary key can be created graphically or using a query .

1.Graphically and 

2.using a query 

1.Graphically :-

Expand Databases -> Expand Database(What ever you created) -> Expand Tables->Select table Which Table You Want to  Drop a primary key-> Right Click on table Select Design->Find column Which column applied a primary key ->then Right click on Column Name ->Click on Remove Primary Key.

2.using a query :-

You can also drop a primary key in SQL Server using the ALTER TABLE statement

Syntax

The syntax to drop a primary key using the ALTER TABLE statement in SQL Server.

Example

Let’s look at an example of how to drop a primary key using the ALTER TABLE statement in SQL Server .

For example:

Print Friendly, PDF & Email

Give us your valuable feedback

comments

About Samba

Check Also

sql server backup script

Backup all databases in SQL Instance with one script

Backup: A copy of SQL Server data that can be used to restore and recover the …