DECLARE @SIR_ADI  VARCHAR(40)
DECLARE SIRKETLER CURSOR FOR
  select name from sysdatabases where [name] like 'Ent%'

OPEN SIRKETLER

FETCH NEXT FROM SIRKETLER INTO @SIR_ADI
WHILE @@FETCH_STATUS = 0 BEGIN
  EXEC('
  USE [' + @SIR_ADI + '] 
  if not exists (select * from dbo.syscolumns where id = object_id(N''CEK'') and name=N''Status'')
	begin
  	ALTER TABLE CEK add Status NVARCHAR(1) NULL
	end

	if not exists (select * from dbo.syscolumns where id = object_id(N''BANKA'') and name=N''BORDRONO2'')
	begin
  	ALTER TABLE BANKA add BORDRONO2 INT NULL
	end
	')
  FETCH NEXT FROM SIRKETLER INTO @SIR_ADI
END

CLOSE SIRKETLER
DEALLOCATE SIRKETLER
GO