sql - How to insert a new record in a table by MAX(ID) + 1 of the same table -
I have a table I get an error Invalid column DispositionKey When I run the code below. Can anyone explain the reason that I am getting this error and how to solve it? insert identification (in this case, clearly value iNSERT defined iNTO ... Select) and therefore The need to be started before inserting allows clear values to be included. CMT_M_DISPOSITION (DispositionKey, DispositionValue) . On pk
DispositionKey I want to insert a new record by using
MAX (DispositionKey) + 1 for the first column.
SET IDENTITY_INSERT insert the CMT_M_DISPOSITION on EY_CMT_TestV2..CMT_M_DISPOSITION (DispositionKey, DispositionValue) Max (DispositionKey ) + select 1, CMT_M_DISPOSITION SET IDENTITY_INSERT EY_CMT_TestV2..CMT_M_DISPOSITION from oFF
Comments
Post a Comment