I have a server with multiple databases. I need to loop through these databases and change a value in one record, in one table, in each database. How can this be done?
EXEC sp_MSForEachDB ' Use ?; UPDATE ?.dbo.MyTable SET MyValue=999 '
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