sql server - SQL Statement -
I am trying to update a column in my table that was inserted at the end. I tried to create this stored procedure:
CREATE PROCEDURE [dbo] [Msp_AssociateEvent] (@EventId int) Update tblFoodMenus set EventID = @EventId where FoodMenuID = IDENT_CURRENT (tblFoodMenus) but this gives me this error: invalid column name tblFoodMenus
Am I using IDENT_CURRENT correctly?
The table name should be in quote
where food menu = IDENT_CURRENT ('tblFoodMenus')
Comments
Post a Comment