Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server - Identity Expand / Collapse
Author
Message
Posted Thursday, July 26, 2012 6:16 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 26, 2012 6:15 AM
Points: 1, Visits: 0
Hi There,

Can anyone tell me what is an Identity?

Thanks
Post #1335744
Posted Thursday, July 26, 2012 6:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 26, 2012 6:21 AM
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
Post #1335754
Posted Thursday, July 26, 2012 6:28 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 8:33 AM
Points: 2,616, Visits: 4,720
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/
Post #1335759
Posted Thursday, July 26, 2012 7:48 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 6:38 PM
Points: 1,371, Visits: 1,560
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

Post #1335850
Posted Thursday, July 26, 2012 8:14 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, May 23, 2014 5:55 AM
Points: 83, Visits: 646
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
sqlwithmanoj.wordpress.com
Post #1335870
Posted Monday, July 30, 2012 1:36 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 12:43 AM
Points: 208, Visits: 563
http://www.simple-talk.com/sql/t-sql-programming/identity-columns/
Post #1337091
Posted Tuesday, July 31, 2012 6:31 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, January 20, 2014 8:16 PM
Points: 323, Visits: 132

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.
Post #1338259
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse