IDENTITY COLUMNS
These are those columns which are used for auto-generation of integer values
in a particular sequence.
example:- we can use identity columns to auto-generate the ID'S in the categoryid
column of the category table.
There can only be 1 identity column per table.
(1,1):
1:start values: (seed)
1:interval for the next value (increment)
create table cat
(catid int identity(001,002),
catname varchar(10),
description varchar(30))
insert cat values('bev', 'teas and coffees')
in a particular sequence.
example:- we can use identity columns to auto-generate the ID'S in the categoryid
column of the category table.
There can only be 1 identity column per table.
(1,1):
1:start values: (seed)
1:interval for the next value (increment)
create table cat
(catid int identity(001,002),
catname varchar(10),
description varchar(30))
insert cat values('bev', 'teas and coffees')
IDENTITY COLUMNS
Reviewed by Rupesh
on
12:03
Rating:
No comments: