T-SQL - Is there a (free) way to compare data in two tables?
- by RPM1984
Okay so i have table a and table b. (SQL Server 2008)
Both tables have the exact same schema.
For the purposes of this question,
consider table a = my local dev table, table b = the live table.
I need to create a SQL script (containing UPDATE/DELETE/INSERT statements) that will update table b to be the same as table a. This script will then be deployed to the live database.
Any free tools out there that can do this, or better yet a way i can do it myself?
I'm thinking i probably need to do some type of a join on all the fields in the tables, then generate dynamic sql based on that.
Anyone have any ideas?