Hello all,
i am Creating New EmployeeId in the Employees table using this statement.
Is there any way i should store this newly created EmployeeId in a local variable so that i can use it for other purposes
Thanks
i am Creating New EmployeeId in the Employees table using this statement.
Code:
BEGIN TRAN
INSERT INTO Employees(EmployeeId,)
SELECT 1 + COALESCE(MAX(EmployeeId), 0)
FROM EMPLOYEES
COMMIT TRAN
Is there any way i should store this newly created EmployeeId in a local variable so that i can use it for other purposes
Thanks