Hi,
In the below procedure i am passing @userID as a parameter . While executing the procedure i want to pass multiple userid and for all the userID i enter the table should be updated. Please help with the code.
I am using sql server 2008
CREATE PROCEDURE [dbo].Mail_Update
(
@userid int
)
AS
Begin
Update A
Set A.IsSent = 1
From Mail A
where A.UserID = @userID
Select * from Mail
where IsSent IS NULL
END
Thanks,
Deepa