how to set value as the identity insertion if it is not being updated in Table
when there is no way to increase the trans id that is a primary incremental key.
: It happens when sometime the data in the table is very high, we are not able to set the key as identity key . so to set the identity key
Declare @Transid bigint
Set @Transid=(Select Max (Transid)+1 from table)
and then you can insert the identity value like this:--------
INsert into table
(Transid,Name, Designation,PhoneNo
)
values
(
@Transid,
@Name,@Designation,@PhoneNo
)

0comments
Post a Comment