I am working in an application in which user selects some rows in a gridview by clicking on check boxes associated with each row and in selected rows only one value should be updated in database. I am using following query
update Items
set bitIsTab = 1
where ReqID = 3
Suppose that user selects 4 values from gridview and i have to set these 4 rows bitIsTab to 1.How to update these rows by calling query one time or i have to call the same query as many times as the number of records selected.
If you know the ReqIDs you can do
update Items
set bitIsTab = 1
where ReqID in (1,2,3,4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With