sqlserver MERGE 異常

在執行MERGE 語句時,一定要確保只更新一條數據

com.microsoft.sqlserver.jdbc.SQLServerException: The MERGE statement attempted to UPDATE or DELETE the same row more than once. This happens when a target row matches more than one source row. A MERGE statement cannot UPDATE/DELETE the same row of the target table multiple times. Refine the ON clause to ensure a target row matches at most one source row, or use the GROUP BY clause to group the source rows.

 

https://stackoverflow.com/questions/40217140/sql-merge-error-the-merge-statement-attempted-to-update-or-delete

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章