I am trying to update a column in my table which was last inserted. I tried creating this stored procedure:
CREATE PROCEDURE [dbo].[msp_AssociateEvent]
(
@EventId int
)
AS
UPDATE tblFoodMenus set
EventID = @EventId
Where FoodMenuID = IDENT_CURRENT(tblFoodMenus)
but it gives me this error: Invalid column name tblFoodMenus.
Am I using IDENT_CURRENT correctly?
PS FoodMenuID is the primary key of tblFoodMenus which is being auto incremented