Identity:
Creates an identity column in a table. This property is used with the CREATE TABLE in increment values.
It can be used identity values to off or on.
SET IDENTITY_INSERT Test on
SET IDENTITY_INSERT Test on
create table Test(Id int identity(1,1))
insert into Test DEFAULT VALUES
create table Test1(Id int identity(1,1))
alter table Test Add name varchar(20)
insert into Test (name)values('munish')
Creates an identity column in a table. This property is used with the CREATE TABLE in increment values.
IDENTITY [ (seed , increment) ]
It can be used identity values to off or on.
SET IDENTITY_INSERT Test on
SET IDENTITY_INSERT Test on
create table Test(Id int identity(1,1))
insert into Test DEFAULT VALUES
create table Test1(Id int identity(1,1))
alter table Test Add name varchar(20)
insert into Test (name)values('munish')
DBCC CHECKIDENT
DBCC CHECKIDENT (Test, RESEED, 0)
DBCC CHECKIDENT (Test, NORESEED)
DBCC CHECKIDENT (Test, NORESEED)
0 comments:
Post a Comment