I'm trying to update a just inserted row in SQL with a table trigger. Below is the trigger. It seems this only updates the already inserted rows and NOT the just inserted row. What am I doing wrong?
ALTER TRIGGER [dbo].[TRG_DIM_Employee]
ON [dbo].[DIM_Employee]
AFTER INSERT
AS
BEGIN
    SET NOCOUNT ON
    UPDATE DIM_Employee
    SET ParentEmployeeKey = i.EmployeeKey
    FROM INSERTED i
    WHERE DIM_Employee.EmployeeId = i.EmployeeId
END
 
     
     
    