Have a Question?

If you have any question you can ask below or enter what you are looking for!



Merge Function in SQL

I have two tables and I have to insert unmatched data from Source table to Master table. Also, Matched data from both tables should remains in Master table. Please find the attachment for reference.

Need Urgent.

  Rupesh Kumar

there is no data available with us but as far as merge function is concerned you can use -


MERGE  [AS TARGET]
USING  [AS SOURCE]
ON 
[WHEN MATCHED 
THEN  ]
[WHEN NOT MATCHED [BY TARGET]
THEN  ]
[WHEN NOT MATCHED BY SOURCE
THEN  ];

  Devbrat Tripathi       21 Dec 2016       0       0     

Post Your Answers:

Please use the CODE HIGHLIGHT Button to format/highlight your codes if any