Hi,
I have to delete some amnt of data and insert some into same table.
Will there be any performance improvement if we go for Upsert in a loop ?
Thanks in advance!
Hi,
I have to delete some amnt of data and insert some into same table.
Will there be any performance improvement if we go for Upsert in a loop ?
Thanks in advance!
No. Just use a simple
DELETE ...
INSERT ...
...probably in a transaction too
You can't "UPSERT" in SQL Server 2005. MERGE was added for SQL Server 2008.
A loop is almost never the answer for any query in a database engine