views:

407

answers:

3

Hi, I've recently done a migration from a really old version of some application to the current version and i faced some problems while migrating databases.

I need a query that could help me to compare columns in two tables. I mean not the data in rows, I need to compare the columns itself to figure out, what changes in table structure I've missed.

+6  A: 

Realy it is a big script. :)

Use red gate sql compare. They offer you 14-day free trial

If you realy need script it can be a text and than you can compare both by using any text comparer.

igor
I'll give it a try. Thanks.
maxt3r
@igor is right, don't write this yourself, there are loads of applications to do this. Apex SQL Diff is another with a free trial.
Tony
+5  A: 
Gaby
Nice! Thanks a lot. I also found a build in stored procedure sp_columns which expects table name as a param.
maxt3r