Script to import data from Excel file to SQL Server but the problem is it creates new data
Solution 1:
insert
will always create new data.
If you want to overwrite old data, you need to use update
instead, and also match a single record to update, preferably with a primary key.
Of course, update will fail if there is not a matching record. Perhaps you want update or insert