May be you are handling exceptional cases... If the INSERT operation failed how you handled that scenario... CREATE TABLE TestIdent (col1 int identity, col2 CHAR(1))insert into TestIdent values('A')insert into TestIdent values('B')insert into TestIdent values('C')insert into TestIdent values('AB') -- failed to insert insert into TestIdent values('D')SELECT * FROM testIdent/*-- Here 4 is missingcol1 col21 A2 B3 C5 D*/DROP TABLE testIdentCREATE TABLE TestIdent (col1 int identity, col2 CHAR(1))DECLARE @input VARCHAR(5) = 'AB' -- success for single character.. If size exceeds 1 then error, at that time you should rollback the operations(transaction)BEGIN TRYinsert into TestIdent SELECT @inputSELECT * FROM testIdentEND TRYBEGIN CATCH SELECT @@ERROREND CATCHGODROP TABLE testIdent
--Chandu