
I don't have working code for you but you could look at the SQLPackage.exe documentation for some inspiration. If you need to compare more than one database file you could script SQLPackage.exe. Order by TABLE_NAME, ORDINAL_POSITION, COLUMN_NAME LEFT join ', into * from where Comment '-' IIF(oc.COLUMN_NAME IS NULL, convert(varchar(20), ''ADDED COLUMN''), convert(varchar(20), ''-'')) as Comment

Select nc.TABLE_SCHEMA, nc.TABLE_NAME, nc.COLUMN_NAME, nc.ORDINAL_POSITION, nc.IS_NULLABLE, IIF(nc.IS_NULLABLE oc.IS_NULLABLE, ''Yes'', ''No''),

Set the two variables newmodel and oldmodel to the appropriate database names and execute the scriptĭeclare table (TABLE_SCHEMA varchar(40), TABLE_NAME varchar(40), COLUMN_NAME varchar(50), ORDINAL_POSITION int, IS_NULLABLE varchar(5), NullChange varchar(5), Comment varchar(50)) After struggling with an easy way to do this same task - see what's changed between 2 models, I wrote the following SQL Script that will compare two schemas to determine new and deleted columns set nocount on
