<s>
An	O
identity	B-Language
column	I-Language
is	O
a	O
column	B-Application
(	O
also	O
known	O
as	O
a	O
field	B-Application
)	O
in	O
a	O
database	B-Application
table	I-Application
that	O
is	O
made	O
up	O
of	O
values	O
generated	O
by	O
the	O
database	O
.	O
</s>
<s>
This	O
is	O
much	O
like	O
an	O
AutoNumber	B-Operating_System
field	B-Application
in	O
Microsoft	B-Application
Access	I-Application
or	O
a	O
sequence	O
in	O
Oracle	B-General_Concept
.	O
</s>
<s>
An	O
identity	B-Language
column	I-Language
differs	O
from	O
a	O
primary	B-Application
key	I-Application
in	O
that	O
its	O
values	O
are	O
managed	O
by	O
the	O
server	O
and	O
usually	O
cannot	O
be	O
modified	O
.	O
</s>
<s>
In	O
many	O
cases	O
an	O
identity	B-Language
column	I-Language
is	O
used	O
as	O
a	O
primary	B-Application
key	I-Application
;	O
however	O
,	O
this	O
is	O
not	O
always	O
the	O
case	O
.	O
</s>
<s>
It	O
is	O
a	O
common	O
misconception	O
that	O
an	O
identity	B-Language
column	I-Language
will	O
enforce	O
uniqueness	O
;	O
however	O
,	O
this	O
is	O
not	O
the	O
case	O
.	O
</s>
<s>
If	O
you	O
want	O
to	O
enforce	O
uniqueness	O
on	O
the	O
column	B-Application
you	O
must	O
include	O
the	O
appropriate	O
constraint	O
too	O
.	O
</s>
<s>
In	O
Microsoft	B-Application
SQL	I-Application
Server	I-Application
you	O
have	O
options	O
for	O
both	O
the	O
seed	O
(	O
starting	O
value	O
)	O
and	O
the	O
increment	O
.	O
</s>
<s>
It	O
is	O
often	O
useful	O
or	O
necessary	O
to	O
know	O
what	O
identity	O
value	O
was	O
generated	O
by	O
an	O
INSERT	B-Language
command	O
.	O
</s>
<s>
Microsoft	B-Application
SQL	I-Application
Server	I-Application
provides	O
several	O
functions	O
to	O
do	O
this	O
:	O
@	O
@IDENTITY	O
provides	O
the	O
last	O
value	O
generated	O
on	O
the	O
current	O
connection	O
in	O
the	O
current	O
scope	O
,	O
while	O
IDENT_CURRENT(tablename )	O
provides	O
the	O
last	O
value	O
generated	O
,	O
regardless	O
of	O
the	O
connection	O
or	O
scope	O
it	O
was	O
created	O
on	O
.	O
</s>
