Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Pass Multiple values to a single parameter

$
0
0

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


Viewing all articles
Browse latest Browse all 7129

Trending Articles