Merge query in SQL Server 2008

前端 未结 2 1971
闹比i
闹比i 2021-01-29 04:56

I having the scenario of loading the data from source table to target table. If the data from source is not present in target, then i need to insert. If it is present in the tar

2条回答
  •  醉话见心
    2021-01-29 05:35

    Check out one of those many links:

    • Using SQL Server 2008's MERGE Statement
    • MERGE on Technet
    • Introduction to MERGE statement
    • SQL Server 2008 MERGE

    Without actually knowing what your database tables look like, we cannot be of more help - you need to read those articles and figure out yourself how to apply this to your concrete situation.

提交回复
热议问题