How to update and add new records at the same time
问题 I have a table that contains over than a million records (products). Now, daily, I need to either update existing records, and/or add new ones. Instead of doing it one-by-one (takes couple of hours), I managed to use SqlBulkCopy to work with bunch of records and managed to do my inserts in the matter of seconds, but it can handle only new inserts. So I am thinking about creating a new table that contains new records and old records; and then use that temporary table (on the SQL end) to update