它是更高效的多列SQL UPDATE:一個語句或多個單列語句中的多個列?
UPDATE myTable
SET [col1] = [col1] + 1,
[col2] = [col2] + 1,
[col3] = [col3] + 1,
...
[colN] = [colN] + 1
或多個UPDATE
每一個列語句來執行一個UPDATE
聲明?
UPDATE myTable SET [col1] = [col1] + 1
UPDATE myTable SET [col2] = [col2] + 1
UPDATE myTable SET [col3] = [col3] + 1
...
UPDATE myTable SET [colN] = [colN] + 1
如果您單獨執行查詢,您可能會收到連接開銷,具體取決於您如何執行它們。 –