SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server - Identity


SQL Server - Identity

Author
Message
katty.jonh
katty.jonh
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 0
Hi There,

Can anyone tell me what is an Identity?

Thanks
corbincreativecomputing
corbincreativecomputing
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 0
Identity (or AutoNumber) is a column that automatically generates numeric values. A start and increment value can be set, but most DBAs leave these at 1. A GUID column also generates unique keys.

Nimol
Programmer
Corbin Creative Databases, LLC, http://www.corbincreative.com
Kingston Dhasian
Kingston Dhasian
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3691 Visits: 5177
Welcome to SSC!!

You can try to Google "IDENTITY SQL Server"
I am sure you will get lots of information which can't be provided in a single forum

If you still have any doubts after reading the articles, feel free to revert with questions.


Kingston Dhasian

How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Lokesh Vij
Lokesh Vij
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2052 Visits: 1599
corbincreativecomputing (7/26/2012)
Identity (or AutoNumber) is a column that automatically generates numeric values. A start and increment value can be set, but most DBAs leave these at 1. A GUID column also generates unique keys.

Nimol
Programmer
Corbin Creative Databases, LLC, http://www.corbincreative.com


Just to add to, Identity can have negative values as well.

~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter


manub22
manub22
SSC Veteran
SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)SSC Veteran (273 reputation)

Group: General Forum Members
Points: 273 Visits: 1863
IDENTITY is a property which gives auto-incremental value to a column whenever a new record is inserted. You have to set the IDENTITY property with a column while creating a table.
Check following blog post to know about all IDENTITY columns: http://sqlwithmanoj.wordpress.com/2012/05/03/all-about-identity-columns/


You can also use IDENTITY() function with "SELECT INTO" statement.
Check following blog post for more info: http://sqlwithmanoj.wordpress.com/2011/12/15/using-identity-function-with-select-statement/

More link: http://sqlwithmanoj.wordpress.com/2011/07/08/reseed-tables-identity-column-value/


~manoj | LinkedIn | Facebook | YouTube
Blog: SQLwithManoj.com

Jitendra Padhiyar
Jitendra Padhiyar
Mr or Mrs. 500
Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)Mr or Mrs. 500 (504 reputation)

Group: General Forum Members
Points: 504 Visits: 671
http://www.simple-talk.com/sql/t-sql-programming/identity-columns/
Boltz442
Boltz442
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 134

You can try to Google "IDENTITY SQL Server"
I am sure you will get lots of information which can't be provided in a single forum

If you still have any doubts after reading the articles, feel free to revert with questions.


You'll probably get an answer faster that way as well

I used to call my self The Master on forums, then I entered the IT industry and realised how much I still have to learn.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search