4
Reply

What is an Identity ?

Ajeet Mishra

Ajeet Mishra

10y
501
0
Reply
    in identity you do not need to providekey value externally
    auto-increment primary key field.
    http://www.w3schools.com/sql/sql_autoincrement.asp
    Identity (or AutoNumber) is a column that automatically generates numeric values. A start and increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers; the value of this cannot be controlled. Identity/GUID columns do not need to be indexed. SELECT @@IDENTITY - returns the last IDENTITY value produced on a connection SELECT IDENT_CURRENT('tablename') - returns the last IDENTITY value produced in a table SELECT SCOPE_IDENTITY() - returns the last IDENTITY value produced on a connection