Código sql:
Ver originalSELECT T1.name,T1.xtype,T1.LENGTH,T2.name,T2.xtype,T2.LENGTH, CASE WHEN T1.xtype<>T2.xtype THEN 'CAMBIO' ELSE '' END [TIPO],
CASE WHEN T1.length<>T2.LENGTH THEN 'CAMBIO' ELSE '' END [LONG]
FROM (
SELECT C1.* FROM Temp.dbo.syscolumns C1
INNER JOIN BBDD1.dbo.sysobjects O2 ON C1.id=O2.id
WHERE O2.name='TABLA1'
) T1
FULL JOIN (
SELECT C1.* FROM DERCO_DBM.dbo.syscolumns C1
INNER JOIN BBDD2.dbo.sysobjects O2 ON C1.id=O2.id
WHERE O2.name='TABLA2'
) T2 ON T1.name=T2.name