Monday , June 25 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

Find all rows count and columns count in single database in sql server

In General for any database it contains lot of tables, if we want to find …

%d bloggers like this: