CREATE TRIGGER InsertProperty ON Property INSTEAD OF Insert AS BEGIN declare @PropertyId bigint DECLARE c1 CURSOR FOR SELECT PropertyId FROM inserted FOR UPDATE OF PropertyId OPEN c1 FETCH NEXT FROM c1 INTO @PropertyId WHILE @@FETCH_STATUS = 0 BEGIN --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 c1 END insert into Property select * from inserted END