Answer the question
In order to leave comments, you need to log in
How to change/update many records quickly?
There is a product catalog on the site. There is an accounting program 1C. Everything in the same local network, 1C and the site use MS SQL.
It is necessary to update the catalog of goods on the site from 1C (product names and other information).
If to do update on 1 record it will be very long.
Is there any way to do it faster? Or an algorithm for such a download?
Another question is, what if the goods have not been unloaded before? Do I need to do select first, and only then update or insert? Is there a faster way?
Answer the question
In order to leave comments, you need to log in
INSERT INTO table (id, a,b,c) VALUES
(9999, 1,2,3),
(9998, 4,5,6) //и таких строк сколько угодно пока укладываемся в ограничение на длину запроса
ON DUPLICATE KEY UPDATE `a`=VALUES(`a`), `b`=VALUES(`b`), `c`=VALUES(`c`);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question