.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> ADO.NET >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Primary key constraint

Posted By:Dhivakaran       Posted Date: October 31, 2010    Points: 15    Category: ADO.NET    URL: http://www.dotnetspark.com  

we can create primary key constraint as below

We can create primary key constraint two different ways
  1. While creating table
Create table tblEmp
empcode varchar(5) constraint PK_empcode
Priamary key clustered,etc

2) existing table
alter table tblemp
add constraint PK_empcode, primary key clustered (empcode)


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend