I know my post has a very similar title to other ones in this forum, but I really couldn\'t find the answer I need.
Here is my problem, I have a SQL Server running o
You can write script like this
DECLARE CURSOR_ALLDB_NAMES CURSOR FOR
SELECT name
FROM Sys.Databases
WHERE name NOT IN('master', 'tempdb')
OPEN CURSOR_ALLDB_NAMES
FETCH CURSOR_ALLDB_NAMES INTO @DB_NAME
WHILE @@Fetch_Status = 0
BEGIN
EXEC('UPDATE '+ @DB_NAME + '..SameTableNameAllDb SET Status=1')
FETCH CURSOR_ALLDB_NAMESINTO INTO @DB_NAME
END
CLOSE CURSOR_ALLDB_NAMES