Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
d3ng
Yak Posting Veteran
83 Posts |
Posted - 2008-11-03 : 01:57:22
|
| Hi SQL Experts,I would like to know how to get the field diffence of 2 tables. Here is my scenario. I have 2 database of our clients, database a and database b, both of them have a table mytable. Basically I want to know the difference of the 2 identical tables in 2 different database so that I can alter the missing fields. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-03 : 02:03:44
|
| you mean structure wise or data wise? i.e missing column info or missing record info? |
 |
|
|
ayamas
Aged Yak Warrior
552 Posts |
|
|
d3ng
Yak Posting Veteran
83 Posts |
Posted - 2008-11-03 : 02:26:55
|
quote: Originally posted by visakh16 you mean structure wise or data wise? i.e missing column info or missing record info?
Structure wise! =j |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-03 : 02:48:42
|
| i dont think there's a direct way to do that. You can however use INFORMATION_SCHEMA.COLUMNS to compare columns on both db and alter accordingly. |
 |
|
|
d3ng
Yak Posting Veteran
83 Posts |
Posted - 2008-11-03 : 03:13:55
|
quote: Originally posted by visakh16 i dont think there's a direct way to do that. You can however use INFORMATION_SCHEMA.COLUMNS to compare columns on both db and alter accordingly.
I already used information_schema. Anyway, thanks for the time and effort guys! |
 |
|
|
|
|
|