Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
SQL Server Transact Basic to Expert - Primary Key Adding to Existing table
WhatsApp
Karthikeyan Anbarasan
13y
3.1
k
0
0
25
Blog
This blog shows how to add a primary key constraint to an existing table
Syntax:
ALter table tablename
Add Constraint(PK_tablename)
Primary Key (ColumnName)
Example:
Alter table emptable
Add Constraint(Pk_Emptable)
Primary Key(empid)
SQL Server Transact Basic to Expert - Primary Key Adding to Existing table
Up Next
SQL Server Transact Basic to Expert - Add Unique Constraints to Existing Table
Ebook Download
View all
Basics of SQL Server
Read by 1.5k people
Download Now!
Learn
View all
Membership not found