Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

How to compare two tables in sql server and produce sync SQL?

Asked by Abhishek Shukla Apr 22, 2021 1.8K views 1 answer
Share

About this question

How do I find out the differences in data between the two tables that have an exact schema, and how to produce synchronization SQL to get the union results (without duplicates)?

These are the 2 tables:SOURCE01.dbo.Customers (31,022 rows)

TARGET01.dbo.Customers (29,300 rows) The schema of each table is :

[CustomerId] : nvarchar(255)
[CustomerSerializedProfile]: nvarchar(max)
[CreatedDatetime] : DateTime

What is the best way to compare two tables in sql server?


Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.