Copy missing rows from one table to another in sql server with stored procedure -
i have tables in different databases (on same server) identical. need transfer data rows left database table right database table, want transfer rows aren't in right database table already.
is there neat way of doing this?
im using sql server 2008 r2
assuming can uniquelly identify row column id:
insert databasename..tablename select * datababasename2..tablename2 id not in (select id databasename..tablename)
Comments
Post a Comment