我有表如下行很多行:如何更新Where子句
id | s1 | s2 | s3 | s4 | s5 |
---------------------------------------
1 | 6 | 2 | null | null | null |
---------------------------------------
2 | 8 | 1 | null | null | null |
我已經這個值,我想將數據添加到細胞中,其中空
我的查詢:
UPDATE table1
SET s3 = "some_s3" WHERE id = 1
SET s4 = "some_s4" WHERE id = 1
SET s5 = "some_s5" WHERE id = 1
SET s3 = "some_s3" WHERE id = 2
SET s4 = "some_s4" WHERE id = 2
SET s5 = "some_s5" WHERE id = 2
就像這樣。但我需要更新千行。
如果您必須更新行,您必須使用更新語句 – Jens
@Jens,我編輯了我的問題。 –