Friday, 27 March 2020

Identity Column in SQl Server

3/27/2020 - By Pranav Singh 2


This article will show you how you can set or make a column as identity or auto incremented in our sql server table column.
For this first we will create a table



Now in this table add a column named as “Id”.


Now set the column identity Yes.


Now add other column name and save table.


Now your table have been created


Now we will insert some data to table to check whether we are getting auto incremented value in table or not

Insert into StudentData(Name,Address) Values('Name1','Address1');
Insert into StudentData(Name,Address) Values('Name2','Address2');
Insert into StudentData(Name,Address) Values('Name3','Address3');

 Now check the output


In above table u can see that the Id column value is auto entered we have not passed the id column value.

Thanks for reading the article please let me know you comment.



Tags:
About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

2 comments:

  1. Identity column for uniqueness thanks for sharing in sql server

    ReplyDelete
    Replies
    1. Hi Daljit thanks for your your valuable comment.

      Delete

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top