CREATE TRIGGER InsertProperty ON PropertyINSTEAD OF InsertASBEGINdeclare @PropertyId bigintDECLARE c1 CURSOR FORSELECT PropertyIdFROM insertedFOR UPDATE OF PropertyId OPEN c1FETCH NEXT FROM c1INTO @PropertyIdWHILE @@FETCH_STATUS = 0BEGIN --Insert into identity table insert into Entity (EntityTypeId) Values(1) --One is a property type --Update the records about to be inserted. UPDATE inserted SET PropertyId = @@Identity WHERE CURRENT OF c1ENDinsert into Property select * from insertedEND